Wednesday, May 14, 2008

Linux Tip - Burn cd's

-- Create an .iso:

#umount /dev/cdrom
#dd if=/dev/cdrom of=filename.iso bs=1024


-- Create .iso image file form a "dir":

#mkisofs -r -J -o file.iso /location_of_folder/
-r generates Rock Ridge long names for Linux
-J generates Joliet long names for Windows

-- Mount .iso file without having to burn:
#mkdir /media/iso
#modprobe loop
#mount cdrom.iso /media/iso/ -t iso9660 -o loop

-- To "burn" an .iso to cd:

#cdrecord dev=/dev/cdrom driveropts=burnfree -v -data cd_image.iso

To burn an audio cd from wav files:

#cdrecord dev=/dev/cdrom driveropts=burnfree -v -audio [wav files...]

Replace /dev/cdrom as needed if this is not your CD-Writer

-v (verbose) lets you track the recording progress

driveropts=burnfree helps reduce the risk of a buffer under-run (most drives should support this)

Set Time - Win2003

- To set the time in a Windows 2003 server you can use the w32tm command

- w32tm /?
- w32tm /config /manualpeerlist:10.1.1.1 /syncfromflags:MANUAL

- net stop w32time
- net start w32time

- w32tm /resync

And that's it, now you will have your server setting the time from the ip:10.1.1.1

Tuesday, January 15, 2008

Linux Tip - Get back GRUB after clone

After cloning a Linux HDD, i've booted from the new hdd and got myself a "pretty" grub error, the screen just went:
GRUB GRUB GRUB GRUB

and it filed my screen with that.

How to recover the mbr? here is the solution that i have found on the net (google it...)

1. Boot with any live CD (I've done it with Knoppix 3.x and Ubuntu)
2. Get a root shell and make a folder (mkdir ubuntu)
3. mount the root (/) partition of ubuntu (e.g. mount /dev/hdb ubuntu if you have two disks)
4. chroot the mounted partition (chroot ubuntu)
5. grub-install /dev/hda [1]
5. Exit the shell
6. Reboot

That did the trick :)

Thursday, January 3, 2008

Linux Tip - no Beeps on console

To remove the beeps on the console, we can do this:

# setterm -blen 0

Then we can put this line on /etc/rc.d/init.d/rc.local

every time your Linux box boot it will read the above line and
this will end the beeps on linux console.