bootable CD-ROM image to memstick image?
Ian Smith
smithi at nimnet.asn.au
Sun Jun 29 17:22:12 UTC 2014
On Sun, 29 Jun 2014 08:03:45 -0600, Warren Block wrote:
> On Sun, 29 Jun 2014, Warren Block wrote:
> > On Sun, 29 Jun 2014, Ian Smith wrote:
> >
> > > I have a bootable BIOS/EC update CD image for a Lenovo X200, with no CD.
> > >
> > > It contains the same good ol' DOS 6.0 BIOS update program as ever, after
> > > a loader from not so good ol' Nero Burning ROM, after 64KB of zeroes.
> > >
> > > root at x200:~smithi/biosupdate # file 6duj48us.iso
> > > 6duj48us.iso: # ISO 9660 CD-ROM filesystem data '6DUJ48US
> > > ' (bootable)
> > > root at x200:~smithi/biosupdate # mdconfig -f 6duj48us.iso
> > > md0
> > > root at x200:~smithi/biosupdate # mount_cd9660 /dev/md0 /mnt
> > > root at x200:~smithi/biosupdate # ls -a /mnt
> > > . ..
> > > root at x200:~smithi/biosupdate #
> > >
> > > Is there a generic way to convert this into a bootable USB image?
> >
> > Possibly the update program and data is in the El Torito floppy image. I've
> > converted floppy images to boot CDs, but not the other way. This might
> > help: http://arstechnica.com/civis/viewtopic.php?f=16&t=308491
Indeed, based on that and finding isoinfo already installed, I just ran
it and was about ready to come back with more questions, when .. ding:
> And based on that:
>
> % isoinfo -d -i 6duj48us.iso
> Setting input-charset to 'ISO8859-1' from locale.
> CD-ROM is in ISO 9660 format
> System id:
> Volume id: 6DUJ48US
> Volume set id:
> Publisher id:
> Data preparer id:
> Application id: NERO BURNING ROM
> Copyright File id:
> Abstract File id:
> Bibliographic File id:
> Volume set size is: 1
> Volume set sequence number is: 1
> Logical block size is: 2048
> Volume size is: 19126
> El Torito VD version 1 found, boot catalog is in sector 20
>
> Joliet with UCS level 3 found.
> No SUSP/Rock Ridge present
> Eltorito validation header:
> Hid 1
> Arch 0 (x86)
> ID 'NERO BURNING ROM'
> Cksum 8A FC OK
> Key 55 AA
> Eltorito defaultboot header:
> Bootid 88 (bootable)
> Boot media 4 (Hard Disk Emulation)
> Load segment 7C0
> Sys type 6
> Nsect 1
> Bootoff 1B 27
Well that matches my copy. Did you just have one lying around? :)
> % dd if=6duj48us.iso of=zoot.img bs=2048 skip=27 count=75744
> 19126+0 records in
> 19126+0 records out
> 39170048 bytes transferred in 0.063829 secs (613672181 bytes/sec)
>
> That file is a 37M MBR hard drive image. Copying it straight to a memory
> stick ought to work.
Using skip=27 does indeed start at the loader, with the DOS 6.0 MBR at
0x4000 after 16KiB zeroes.
I was confused by count=75744, some 148MiB at 2K sectors, but count is
ignored unless less than filesize anyway, so any larger value - or no
value at all - works, great, but then our record counts don't agree:
root at x200:~ # dd if=/home/smithi/biosupdate/6duj48us.iso of=6duj48us.img
bs=2048 skip=27
19099+0 records in
19099+0 records out
39114752 bytes transferred in 0.477592 secs (81899933 bytes/sec)
Your 19126 records would be the whole file, 30170048 bytes here, so it
looks like 'skip=27' didn't skip on yours, or I'm missing something?
Pressing on, plugging in a spare stick:
root at x200:~ # dd if=6duj48us.img of=/dev/da0 bs=2048 conv=sync
19099+0 records in
19099+0 records out
39114752 bytes transferred in 24.952938 secs (1567541 bytes/sec)
root at x200:~ # ll /dev/da*
crw-rw---- 1 root operator 0x93 Jun 30 02:51 /dev/da0
crw-rw---- 1 root operator 0x94 Jun 30 02:51 /dev/da0s1
Wow, that stick had a /dev/da0a there before. This looks promising ..
root at x200:~ # mount_msdosfs /dev/da0s1 /dist
root at x200:~ # ls -lrt /dist
total 184
-rwxr-xr-x 1 root wheel 9349 Dec 31 1993 WINA20.386*
-r-xr-xr-x 1 root wheel 37174 Dec 31 1993 IBMDOS.COM*
-r-xr-xr-x 1 root wheel 40758 Dec 31 1993 IBMBIO.COM*
-rwxr-xr-x 1 root wheel 54654 Dec 31 1993 COMMAND.COM*
-rwxr-xr-x 1 root wheel 14160 Nov 18 1994 HIMEM.SYS*
-rwxr-xr-x 1 root wheel 12663 Apr 23 1999 RAMDRIVE.SYS*
drwxr-xr-x 1 root wheel 2048 Apr 4 2008 System Volume Information/
-rwxr-xr-x 1 root wheel 123 Apr 15 2009 CONFIG.SYS*
-rwxr-xr-x 1 root wheel 58 Feb 5 2013 AUTOEXEC.BAT*
drwxr-xr-x 1 root wheel 2048 May 10 2013 $RECYCLE.BIN/
drwxr-xr-x 1 root wheel 2048 May 10 2013 EFI/
drwxr-xr-x 1 root wheel 2048 May 10 2013 Flash/
drwxr-xr-x 1 root wheel 2048 Jun 13 2013 Recycled/
Cool! I'll have to backup some stuff before trying it, manyana.
Thanks heaps,
Ian
More information about the freebsd-mobile
mailing list