This part of the tutorial will shred the contents of a usb hard disk. You should only follow this tutorial if you understand what you are doing. You are entirely responsible if something goes terribly wrong.
(link back to Intro)
My shiny Gentoo workstation mounts the Asus DVD at /media/EeePC, so
0x0065 / # mkdir -p /tmp/working
0x0065 / # cd /tmp/working
0x0065 working # ls /media/EeePC/ 2007.10.19_13.01.bld boot P701L.gz techsupp.txt asus.ico Drivers Readme.txt techsupp.txt~ autorun.inf Filelist.txt Setup.exe user_start.dat Bin Filelist.txt~ Setup.exe.manifest ver.tag blockcount.dat Manual Software ver.tag~
0x0065 working # cp /media/EeePC/P701L.gz .
0x0065 working # ls /media/EeePC/boot/ boot.cat initrd.gz isolinux usb.img.gz vmlinuz
0x0065 working # cp /media/EeePC/boot/usb.img.gz .
0x0065 working # ls P701L.gz usb.img.gz
0x0065 working # gunzip usb.img.gz
0x0065 working # file usb.img usb.img: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200, GRUB version 0.94; partition 1: ID=0x6, starthead 1, startsector 62, 2738044 sectors
So the usb.img.gz file is just a gzipped regular disk image made with dd… (
) sweet (
)
We're about to shred the file system on a usb key & replace it with our disk image. If you don't understand what you're doing stop now or seek help specific to your computer setup, or there will probably be tears. I seriously doubt that your setup will match mine exactly…
My usb key has been given device /dev/sdg so…
0x0065 working # dd if=usb.img of=/dev/sdg 8192+0 records in 8192+0 records out 4194304 bytes (4.2 MB) copied, 2.50702 s, 1.7 MB/s
…remove usb key, pause, 2, 3, and replug your usb key again…
…and my shiny gentoo workstation has automagically mounted the usb key at /media/EEEPC. One way or another, mount the first (and only) partition on your re-imaged USB key. (It is now FAT16, by the way)
0x0065 working # fdisk -l /dev/sdg Disk /dev/sdg: 2079 MB, 2079326208 bytes /dev/sdg1 1 701 1369022 6 FAT16
0x0065 working # ls /media/EEEPC/ boot
0x0065 working # ls /media/EEEPC/boot/ grub initrd.gz vmlinuz
…if you want to customise the disk layout, initrd & boot options of the restore image, skip to Part 2 now. The rest of this tutorial is busywork that you'll have to re-visit later anyway.
…if you just want a standard USB restore key then please continue to the end of part 1.
0x0065 working # cp P701L.gz /media/EEEPC
For the standard restore image we need to copy some more files from the Asus system restore DVD to the re-imaged USB restore key…
0x0065 working # cp /media/EeePC/2007.10.19_13.01.bld /media/EEEPC/
0x0065 working # cp /media/EeePC/blockcount.dat /media/EEEPC/
0x0065 working # cp /media/EeePC/user_start.dat /media/EEEPC/
0x0065 working # umount /media/EEEPC
You now have a disk that's ALMOST identical to the 'Windows Genuine Advantage' option for creation of the USB Restore Disk. The Windows scripts rename the filesystem to EEEPC-701 at some point… …this seems to be irrelevant.
It works for me.