Booting From a Thumb-Drive? · Sep 17, 02:27 AM by Dylan Doxey
Who needs it? That's just bragging rights for nerds!
That is, unless you need it.
I bought the Shuttle SA76G2 bare bones system, AMD Pantheon II, and 4GB of memory. This should make a nice little desktop workstation.
I slapped it all together, started it up, and popped in the Ubuntu 9.04 install disk. I entered the BIOS setup and set the the book disk priority to go to CDROM first.
That should do it. Right?
Wrong.
Evidently this machine doesn't support ISOLINUX, and therefore won't boot from the Ubuntu installer disk.
Cutting a long story short -- I found the solution in using a Smart Boot Manager image to boot the machine on a thumb-drive, which in turn presents you with a menu asking what your preferred boot device is.
Yes!
The procedure goes a little something like this:
- working from another fully functional machine ...
- pop in the thumb drive
- unmount the thumb drive
- format the thumb drive (presumed necessary)
- install the Smart Boot Manager image -- sbm.bin
- remove the thumb drive
- stick it in the crippled machine (assuming crippled can be defined as lacking ISOLINUX support)
- put the Ubuntu install disk in
- fire it up
- if necessary, ensure that USB devices are in the boot device sequence
- allow boot process to go about its business
- wait for the SBM boot device selection menu
- select the CDROM
- observe normal CDROM booting occur before your very eyes
The key component here is the sbm.bin Smart Boot Manager image file which I found by poking around on the Ubuntu install disk.
/media/cdrom/install/sbm.bin
Those of you who may have worked with Chilton's automotive repair manuals might have noticed the occasional directive such as, "Next remove the exhaust manifold." But as you proceed it is immediately apparent that this operation deserves more than a casual one line mention. This would be the case above when I stated, "install the Smart Boot Manager image -- sbm.bin".
Here's a play by play.
After plugging the thumb drive in, you'll need to know what device it is. (You'll be pleased to know that it's really really hard to accidentally format your primary boot device in Linux.)
dylan@doxey.org:~/Desktop$ sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c4861
Device Boot Start End Blocks Id System
/dev/sda1 * 1 59483 477797166 83 Linux
/dev/sda2 59484 60801 10586835 5 Extended
/dev/sda5 59484 60801 10586803+ 82 Linux swap / Solaris
Note: sector size is 4096 (not 512)
Disk /dev/sdc: 7952 MB, 7952142336 bytes
217 heads, 32 sectors/track, 279 cylinders
Units = cylinders of 6944 * 4096 = 28442624 bytes
Disk identifier: 0x20202020
Device Boot Start End Blocks Id System
/dev/sdc1 1 280 7765508 b W95 FAT32
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 1, 32)
Partition 1 has different physical/logical endings:
phys=(120, 216, 32) logical=(279, 126, 32)
Disk /dev/sdb: 129 MB, 129236992 bytes
8 heads, 32 sectors/track, 986 cylinders
Units = cylinders of 256 * 512 = 131072 bytes
Disk identifier: 0xfd266c52
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 986 126192 6 FAT16
That's the little bugger at the bottom: /dev/sdb1. (I think there is probably a better way to identify your thumb drive. But you can be pretty sure by removing the thumb drive and observing fdisk -l one more time. In my case there's just nothing else that would be FAT 16. Gosh!)
Doing fdisk -l is generally an intert action -- but you do need to do it as root to see anything useful.
Format the thumb drive.
dylan@doxey.org:~/Desktop$ sudo mkfs.ext3 /dev/sdb1 mke2fs 1.41.4 (27-Jan-2009) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 251968 inodes, 1007612 blocks 50380 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1031798784 31 block groups 32768 blocks per group, 32768 fragments per group 8128 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 36 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
Obviously there's nothing inert about formatting a storage device. But you'll find it's hard to format something you didn't mean to.
Now add the SBM image.
dylan@doxey.org:~/Desktop$ sudo dd if=/media/cdrom/install/sbm.bin of=/dev/sdb1 2880+0 records in 2880+0 records out 1474560 bytes (1.5 MB) copied, 0.934536 s, 1.6 MB/s
Now your thumb drive is suitable for booting up and providing an alternate means of directing the machine which device to boot from.
Now that's something worth bragging about!
Happy computing.

Commenting is closed for this article.
