Recently I was locked out of a customer-provided laptop with their development environment, and access to their source code repository via vpn. I suspect their domain controller propagated an update last time I was on the vpn which has locked me out.
They're overseas and about 12 hours flight time away, so with their permission I used ntpasswd to reset the Administrator password. The boot CD (downloadable as an iso) uses syslinux, which is fine, except that instead of wasting CD-Rs I like to use USB keys.
I copied the contents to a blank FAT32-formatted usb key, but it has no boot sector yet. I installed grub and tried to make a grub menu file from the syslinux.cfg with these tips for converting a syslinux .cfg file to a grub .conf file. I failed because the syslinux.cfg has the line:
append rw vga=1 initrd=initrd.cgz,scsi.cgz
And I don't know how to append the two cgz's into one grub initrd line. Normally grub uses an initrd like this:
initrd /initrd.cgz
So I decided to install syslinux from linux. The man page makes it look easy:
syslinux [-sfr] [-d directory] [-o offset] deviceWhen I ran "syslinux /dev/sdd1" and booted the laptop with this usb key, it just gave me a blank cursor blink. This is because the laptop is looking in the MBR of the usb key and finding nothing. The syslinux man page shows some hints:
Booting from a FAT partition on a hard disk
SYSLINUX can boot from a FAT filesystem partition on a hard disk
(including FAT32). The installation procedure is identical to the pro-
cedure for installing it on a floppy, and should work under either DOS
or Linux. To boot from a partition, SYSLINUX needs to be launched from
a Master Boot Record or another boot loader, just like DOS itself
would. A sample master boot sector (mbr.bin) is included with SYSLINUX.
Well, that's nice to know, but how do I put that on my usb key? Follow these steps:
1. Start with a FAT32 formatted usb key (it can have other data on it) and some syslinux-based boot image. I'm using the latest ntpasswd iso cd080802. Unpack the contents to the root of the usb key.
2. Copy a boot sector to the code image of the MBR of your to-be-booted usb key:
dd if=/usr/share/syslinux/mbr.bin of=/dev/sdd bs=440 count=1Look at Wikipedia for an explanation of the MBR layout
/dev/sdd is my usb key
your mbr.bin might be in a different location. It should come installed with syslinux
3. Run syslinux to make the partition bootable:
sudo syslinux /dev/sdd1
4. Mark the partition as bootable (may not be necessary)
fdisk /dev/sddSelect a, 1, w to make the first partition bootable. CHECK THESE OPTIONS FIRST!
5. Insert USB key to your PC / laptop and boot (so long as your BIOS is setup and capable!)
![Digg](http://1.bp.blogspot.com/_lxBSX0YJV58/SwQiO9krTcI/AAAAAAAAAhc/80Z-NLrZ7wU/s1600/digg.png)
![Google Bookmarks](http://1.bp.blogspot.com/_lxBSX0YJV58/SwQitItySOI/AAAAAAAAAhs/RQQh6Du9HrA/s1600/google.png)
![reddit](http://1.bp.blogspot.com/_lxBSX0YJV58/SwQitlmYSuI/AAAAAAAAAh8/mTtVHQxL_mE/s1600/reddit.png)
![Mixx](http://2.bp.blogspot.com/_lxBSX0YJV58/SwQitawG7PI/AAAAAAAAAh0/vF4HOlj8JH8/s1600/mixx.png)
![StumbleUpon](http://2.bp.blogspot.com/_lxBSX0YJV58/SwQit6IUS5I/AAAAAAAAAiE/gfbBSYnbjnU/s1600/stumbleupon.png)
![Technorati](http://4.bp.blogspot.com/_lxBSX0YJV58/SwQiuP6h64I/AAAAAAAAAiM/x_aGzBKYCgc/s1600/technorati.png)
![Yahoo! Buzz](http://1.bp.blogspot.com/_lxBSX0YJV58/SwQi2FtKY5I/AAAAAAAAAiU/ByTK_Wci_Uo/s1600/yahoo.png)
![DesignFloat](http://4.bp.blogspot.com/_lxBSX0YJV58/SwQiOmnjWDI/AAAAAAAAAhU/nMIbaOaCDic/s1600/designfloat.png)
![Delicious](http://4.bp.blogspot.com/_lxBSX0YJV58/SwQiOHLlI8I/AAAAAAAAAhM/6JP39Dh6sF8/s1600/delicious.png)
![BlinkList](http://3.bp.blogspot.com/_lxBSX0YJV58/SwQiN859bNI/AAAAAAAAAhE/E_Uh6XTQmpo/s1600/blinklist.png)
![Furl](http://3.bp.blogspot.com/_lxBSX0YJV58/SwQiPG9Y6xI/AAAAAAAAAhk/YzmjQUPdnrg/s1600/furl.png)