Creating a super-pendrive
Hi,
Its been really long since I blogged. Before going ahead, want to tell you that will be posting my endeavours on running virtual machines soon.
This, however, is my experience/guide for creating a super pen drive (a.k.a. a usb disk that if booted from presents a grub menu with options - GParted, Fedora, .. and any other linux distro hopefully, and has Fedora persistence, and has a spare partition too for you to use it as a normal pen drive).
It wasn’t as straight forward as I thought (like… all other things).
Steps:
- Decide the partitioning layout and partition the pen drive.
- Install grub on one partition
- Install GParted on another
- Install Fedora on another
- Install grub again on the partition in step 2 :P, and setup grub.conf
- Sit back, and enjoy (may need to crouch forward in some cases.. )
A super neat trick:
To check at any time how you pen drive would behave if you boot from it, use the command : qemu -hda /dev/sdb -m 256 -vga std
This command reduced my research time to one third.
1) Decide the partitioning layout
I used GParted on my Fedora installation (on my harddisk) to set up the partition of the pen drive.
2) Install grub on one partition
Make sure you manually mount the grub partition. The /media/something folder in which it gets mounted automatically gave me some trouble. So unmounted it from there, and mounted /dev/sdb5 to /mnt/usbgrub
grub-install --no-floppy --root-directory=/mnt/usbgrub/ /dev/sdb
3) Install GParted on another
Use UNetbootin for GParted
4) Install Fedora on another
Need to make sure that usb disk is ext3 before doing this. When I did this on a vfat disk, I got an “error 22” when trying to boot from the usb disk.
Use liveusb-creator or live-iso-to-disk for Fedora.
Persistence is buggy according to http://forums.fedoraforum.org/archive/index.php/t-219250.html so instead, a better solution is to directly install fedora on the pen drive on a separate partition, like in http://linuxsoftwareblog.com/blog/?p=156
5) Install grub again on the partition in step 2 :P, and setup grub.conf
1 | mount /dev/sdb5 /mnt/usbgrub/ |
gedit grub.conf
1 | # grub.conf generated by anaconda |
Creating a super-pendrive