maks blog
   


About
maks blog, Hacks, fun around free software.

maximilian attems
email maks

Subscribe
Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.

Flavours
There's more than one way to view this weblog; try these flavours on for size.

Blogs
Other blogs in our institute or friends.

       
Tue, 24 Jan 2006

boot from usb disc
Take care to backup any data before formating your device. Copy your root. Change your current root device to the usb device. Of course your kernel or better your distro initramfs should have support for booting from usb disc.

mkfs.ext3 /dev/sda1
mount /dev/sda1 /mnt
find / -xdev | cpio -pm /mnt
echo "(hd1)   /dev/sdb" >> /mnt/boot/grub/device.map
perl -pi -e s/sda1/sdb1/ /mnt/boot/grub/menu.lst
perl -pi -e s/sda1/sdb1/ /mnt/etc/fstab
grub-install --install-dir /mnt /dev/sdb

[/tech] permanent link