News:

The Latest electronic and computer Tips that work!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - branx86

#136
Linux Fixes / Create a ISO from CDROM
February 14, 2017, 12:21:31 PM

dd if=/dev/cdrom of=/path/to/image.iso


Create the mount point directory on Linux: sudo mkdir /mnt/iso
Mount the ISO file on Linux: sudo mount -o loop /path/to/my-iso-image.iso /mnt/iso
Verify it, run: mount OR df -H OR ls -l /mnt/iso/
Unmount the ISO file using: sudo umount /mnt/iso/
#137
Linux Fixes / Mount VHD or VHDx
February 13, 2017, 11:24:41 AM


1st. sudo apt-get install libguestfs-tools

2nd. guestmount -a anyvirtualdisk.vhdx -i --ro /mnt/anydirectory
#138
Linux Fixes / TO Get the Model Server
February 10, 2017, 03:03:41 PM
dmidecode |grep -i proliant
#139
Linux Fixes / SmartArray HP proliant raid drivers
February 10, 2017, 02:29:27 PM
http://cciss.sourceforge.net

to View info

smartctl -a -d cciss,0 /dev/cciss/c0d0    Shows drive 0
smartctl -a -d cciss,1 /dev/cciss/c0d0    Shows Drive 1

List all controllers:
hpacucli controller all show

List physical drives on controller in slot 0:
hpacucli ctrl slot=0 pd all show status

List physical drives Raid configuration
hpacucli ctrl slot=0 show config

hpacucli ctrl slot=0 ld all show detail



#140
Linux Fixes / Uninstall Fog
February 08, 2017, 03:13:20 PM
Uninstall FOG

Remove files
/var/www/fog
/opt/fog
/tftpboot
/images

delete fog database
mysql
drop database fog;
quit

delete fog system user
userdel fog

remove service
sudo rm /etc/init.d/FOGImageReplicator
sudo rm /etc/init.d/FOGMulticastManager


Name that file ./uninstallfog.sh
https://wiki.fogproject.org/wiki/?title=Uninstall_FOG
#141
Raspberry Pi / Take a Picture
December 08, 2016, 03:21:38 PM
Take a picture
Install the software:
sudo apt-get install fswebcam
Capture images:
fswebcam -r 640x480 image.jpg


ls  /dev/v4l/by-id/    will list all USB cams
lsusb   will give the address of cams

sudo modprobe bcm2835-v4l2   -If you see a grey picture from camera or no picture at all
#142
Raspberry Pi / Shoot Video and playback with USB Cam
December 08, 2016, 03:18:53 PM
Shoot video:
sudo apt-get update
sudo apt-get install ffmpeg
  ffmpeg avconv -f video4linux2 -r 7 -s 640x480 -i /dev/video0 video0.avi
ls  /dev/v4l/by-id/    will list all USB cams
v4l2-ctl --list-formats will show all formats cams will do
ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video0 -frames 1 out.jpg   - Takes a picture
ffmpeg -f v4l2 -framerate 30 -video_size 1280x720 -input_format mjpeg -i /dev/video0 -c copy out.mkv  - Make Video


play video:
sudo apt-get install omxplayer
omxplayer -o hdmi video0.avi



ls  /dev/v4l/by-id/    will list all USB cams
lsusb   will give the address of cams

sudo modprobe bcm2835-v4l2   -If you see a grey picture from camera or no picture at all
#143
Linux Fixes / Dump Database in a .sql file
November 18, 2016, 12:45:45 PM
To make a .sql file just go to the cmd line and type mysqldump Database > .sql File name.

    cmd        Database          .sql file
mysqldump test            >    dump.sql


example :   mysqldump --opt -u root -p'YourPasswordHere' gallery3 > ~/gallery3.sql
#144
If you have your old web.config, you need to take the line that says AsymmetricKey and move it over to replace the one in the new web.config. You can't recover the full key if you don't have the web.config.
#145
Linux Fixes / Mount folder from Linux to Linux
November 15, 2016, 03:20:15 PM

              Source Server     The Path        Destination Folder on the server
mount       192.168.1.250:/mnt/bigdisk /mnt/bigdrive

Problem:   If the message mount.nfs: access denied by server while mounting

Solution:  1st      showmount -e "the ip of the computer share"   check to see if the /mnt/drive is being shared.
                2nd     check that the usr is mapped and the correct group set
                3rd      if using a server mak sure the nfs server is running and the correct mount is being served.
#146
Linux Fixes / Change Chip HDMI Resolution
November 15, 2016, 11:55:36 AM
You can change the resolution via SSH using the following commands (login as 'chip' user, not as 'root'):

chip@chip:~$ export DISPLAY=:0
chip@chip:~$ xrandr --output HDMI-1 --mode 1280x720 --rate 60.00

You can see more of my observations here: https://bbs.nextthing.co/t/just-got-c-h-i-p-and-the-screen-keeps-going-black-on-and-off/11595/3?u=mikakoskiola
#147
Linux Fixes / Create Backup of MySQL Database
November 03, 2016, 03:51:49 PM
mysqldump database_name > /path/to/store/database_name.sql

mysqldump -u [username] –p[password] [database_name] > [dump_file.sql]
#148
Linux Fixes / Setup Linux Router with 2 Nics
November 03, 2016, 02:14:44 PM
Turn off selinux
/etc/sysconfig/selinux
Choose disabled

sestenforce 0

/etc/sysconfig/netwok-script/ifcfg-eth1
Make sure this IP is your Gateway 192.168.1.1

/etc/sysctl.conf
net.ipv4.ip_forward=1

sysctl -p  /etc/sysctl.conf enables change

Setup Nating
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

etc/sysconfig/network
FORWARD_IPV4=YES

etc/sysconfig/dhcpd
DHCPDARGS=eth1

etc/sysconfig/network
NETWORKING=yes
HOSTNAME=DHCP
GATEWAY=192.168.1.1


/etc/dhcpd/dhcpd.conf
Option domain-name "cbrandon.local";
Option domain-name-servers 192.168.1.1,8.8.8.8;
Default-lease-time 600;
Max-lease-time 7200;
Authoritative;
Log-facility local7;
#this is a very basic subnet
Subnet 192.168.1.0 netmask 255.255.255.0{
Range 192.168.1.1 192.168.1.250;
Option routers 192.168.1.1;
}

Service dhcpd start

route add -host 255.255.255.255 dev eth1
route delete default gw 192.168.1.1 eth1
route add default gw 192.168.1.1 eth0

chkconfig NetworkManager off
Service NetworkManager stop
Chkconfig network on
Service network restart

iptables -F      Deletes all rules
iptables -t nat -F
iptables -t mangle -F
iptables -X         Deletes all rules not default
iptables -t nat -X
iptables -t mangle -X


iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
#149
Windows Fixes / Lock workstation from cmd
November 02, 2016, 09:47:25 AM

rundll32.exe user32.dll, LockWorkStation
#150
Windows Fixes / Add program to Startup win10
November 02, 2016, 09:45:23 AM
Open the "Run" dialog box type shell:startup

shortcut is placed in the "Startup" directory.