HOMEPAGE FORUMS NEWS DOCUMENTATION SCREENSHOTS
SystemRescueCd forums
View unanswered posts | View active topics It is currently 16 Sep 2014, 02:51



Post new topic Reply to topic  [ 3 posts ] 
 My USB key story. (succes) 
Author Message

Joined: 04 Nov 2005, 19:05
Posts: 4
Post My USB key story. (succes)
I tries several way to boot from my usbkey with SystemRescueCd and got no luck.
ATM I have Damn small linux, Feather Linux, Debian NetInstall, RIP Linux and now SystemRescueCd. Next step is BartPE.
Here is my step by step to my succes.

1 - USB Key
I ajust my usbkey to usb-zip storage format. (1024 cylinder and 32 head)
I have a 1 gig FAT16 partition on my 2 gig key.
I use the mkdiskimage script to ajust, partition and format the usb key.
Code:
        Disk /dev/sdc: 2097 MB, 2097152000 bytes
        64 heads, 32 sectors/track, 2000 cylinders
        Units = cylinders of 2048 * 512 = 1048576 bytes

        Device Boot      Start         End      Blocks   Id  System
        /dev/sdc4   *           1        1024     1048560    6  FAT16


2 - Syslinux bootloader
Source : syslinux v3.11
Code:
echo mtools_skip_check=1 > ~/.mtoolsrc
syslinux /dev/sdc4
You can test your syslinux by booting on your usbkey and see the syslinux logo and the ldlinux.sys at the root of your usb key.


2.1 - Syslinux.cfg
Code:
label scd
kernel vmlinuz1
append initrd=initrd1 acpi=off root=/dev/ram0 init=linuxrc noscsi usbstick cdcache vga=794
label menu
kernel srcdmenu.com
cdcache is the key of this story. I remove dokeymap too.


3 - SystemRescueCd
source : v0.2.16_pre2
Copy from the isolinux dir on the CD.
Code:
maps , inirtd1, keyb.tkl , srcdmenu.com , vmlinuz1
And the must important part
Code:
sysrcd.dat
from the root dir of the CD to the root dir of the usb key.


4 - linuxrc hack
copy inirtd1 to /tmp then ...
Code:
mv initrd1 initrd1.gz && gunzip initrd1.gz && mount -o loop initrd1 /mnt/test

Edit /mnt/tmp/linuxrc ...
ASKKEYMAP="no"
Code:
findusbmount()
{
    if mount -t vfat -r /newroot/dev/scsi/host0/bus0/target0/lun0/part4 /newroot/mnt/cdrom; then
        if [ ! -e /newroot/mnt/cdrom/sysrcd.dat ]; then
            echo -e "${HILITE}---- /newroot/../part4 is not a Live-USB Stick; skipping...${NORMAL}"
            umount /newroot/mnt/cdrom
        else
            mounted=/newroot/dev/scsi/host0/bus0/target0/lun0/part4
            echo -e "${HILITE}---- USB medium found on /newroot/dev/../.part4${NORMAL}"
        fi
    fi
}
You see I change "part1" to "part4".

Repack your initrd1 and copy to your usb key.
Code:
umount /mnt/test && gzip -9 initrd1 && mv initrd1.gz initrd1 && cp initrd1 /media/usb4 && umount /media/usb4
My /dev/sdc4 was mounted in /media/usb4 of course.


End
Nothing more nothing less.
And is the first time I made a guide in english.


05 Nov 2005, 04:20
Profile
Post 
Thanks for that, i have been pulling my hair out trying to get rescue cd installed to my multi partition usb key. Unfortunately I cant get syslinux to ever work, so i made an ext2 partition at the end of the stick and installed grub to its mbr. Works ok, with the added bonus that windows cant see it, and therefore i cant delete it when moving files around the place.


06 Nov 2005, 05:18
Post Re: My USB key story. (succes)
vonloschz wrote:
I tries several way to boot from my usbkey with SystemRescueCd and got no luck.
ATM I have Damn small linux, Feather Linux, Debian NetInstall, RIP Linux and now SystemRescueCd. Next step is BartPE.
Here is my step by step to my succes.

1 - USB Key
I ajust my usbkey to usb-zip storage format. (1024 cylinder and 32 head)
I have a 1 gig FAT16 partition on my 2 gig key.
I use the mkdiskimage script to ajust, partition and format the usb key.
Code:
        Disk /dev/sdc: 2097 MB, 2097152000 bytes
        64 heads, 32 sectors/track, 2000 cylinders
        Units = cylinders of 2048 * 512 = 1048576 bytes

        Device Boot      Start         End      Blocks   Id  System
        /dev/sdc4   *           1        1024     1048560    6  FAT16


2 - Syslinux bootloader
Source : syslinux v3.11
Code:
echo mtools_skip_check=1 > ~/.mtoolsrc
syslinux /dev/sdc4
You can test your syslinux by booting on your usbkey and see the syslinux logo and the ldlinux.sys at the root of your usb key.


2.1 - Syslinux.cfg
Code:
label scd
kernel vmlinuz1
append initrd=initrd1 acpi=off root=/dev/ram0 init=linuxrc noscsi usbstick cdcache vga=794
label menu
kernel srcdmenu.com
cdcache is the key of this story. I remove dokeymap too.


3 - SystemRescueCd
source : v0.2.16_pre2
Copy from the isolinux dir on the CD.
Code:
maps , inirtd1, keyb.tkl , srcdmenu.com , vmlinuz1
And the must important part
Code:
sysrcd.dat
from the root dir of the CD to the root dir of the usb key.


4 - linuxrc hack
copy inirtd1 to /tmp then ...
Code:
mv initrd1 initrd1.gz && gunzip initrd1.gz && mount -o loop initrd1 /mnt/test

Edit /mnt/tmp/linuxrc ...
ASKKEYMAP="no"
Code:
findusbmount()
{
    if mount -t vfat -r /newroot/dev/scsi/host0/bus0/target0/lun0/part4 /newroot/mnt/cdrom; then
        if [ ! -e /newroot/mnt/cdrom/sysrcd.dat ]; then
            echo -e "${HILITE}---- /newroot/../part4 is not a Live-USB Stick; skipping...${NORMAL}"
            umount /newroot/mnt/cdrom
        else
            mounted=/newroot/dev/scsi/host0/bus0/target0/lun0/part4
            echo -e "${HILITE}---- USB medium found on /newroot/dev/../.part4${NORMAL}"
        fi
    fi
}
You see I change "part1" to "part4".

Repack your initrd1 and copy to your usb key.
Code:
umount /mnt/test && gzip -9 initrd1 && mv initrd1.gz initrd1 && cp initrd1 /media/usb4 && umount /media/usb4
My /dev/sdc4 was mounted in /media/usb4 of course.


End
Nothing more nothing less.
And is the first time I made a guide in english.


27 Dec 2005, 00:03
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: Bing [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.