View Single Post

   
  #10 (permalink)  
Old 02-20-2008, 10:35 AM
Frank Boehm
 
Posts: n/a
Default Re: usb memory stick boot sector problem

TTK Ciar <ttk@remove_this_and_all_after_org.ciar.org.hyperc ount.com> wrote:

<snipped description, IMHO unneccessary complex>

You are right, important key is to write a valid mbr, I do prefer
http://ms-sys.sourceforge.net/

Use as partition type (6) FAT16 and not (b) W95 FAT32, the
documentation for syslinux says *only* Fat16 can be used.

Which partition type did you actually write/format, might be different
from the entry in the partition table?

Should be possible to use loadlin with FAT32, but untested by me, I'm
using syslinux on a FAT16 partition.


next is a part of my own documentation for another project
http://www.baldar.de/pub/restore/how...tore-HOWTO.txt
-----------------------------------------------------------------------
6.15. USB-Stick and USB-hdd

My kernel can be used to boot an usb-stick or usb-hdd. Find out, if
your bios will need an usb-stick formatted as a super floppy without
partitions. Newer bios will expect a normal hdd partition layout.
Boot from CD, your stick is detected by the kernel? Use cfdisk to
create a beautiful new partition table. First partition FAT16
beginning at the start with 512MB size. Toggle the partition as boot
able. Create the dos fs with mkdosfs. ms-sys -s /dev/your_device to
create a mbr and syslinux /dev/your_device_partition1. Now you have to
mount the partition and copy the following files to the root directory
of your new partition. Note the ldlinux.sys already there, don't
overwrite it.



Files to copy:
from /isolinux/
message.txt
f2.txt
f3.txt
f4.txt
syslinux
syslinux.cfg
syslinux.com
initrd.img
from /kernels/baldar.de/ only bzImage.



The root directory of the partition should contain now 10 files
including ldlinux.sys. Now you have to edit syslinux.cfg. You can use
the working isolinux.cfg from the cd, copy it to syslinux.cfg and
change in the line starting with default /kernels/baldar.de/bzImage to
default bzImage, keep the rest as is. You are now ready to boot from
the stick, some Computer can only boot from a stick, if your power
off, plug in the stick, power on computer. There are many broken
implementations, but this approach should work with newer Computers.
Best working for me are external usb-drives with their own power and
newer chip sets. Not every USB-Stick is detected.
-----------------------------------------------------------------------
#isolinux.cfg
#
#change the ramdisk_size now 120MB
default bzImage rw initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=122880 root=/dev/ram0 SLACK_KERNEL=baldar.de
#APPEND rw hda=ide-scsi hdb=ide-scsi hdc=ide-scsi hdd=ide-scsi
#ONTIMEOUT linux auto
#ONERROR kernel options
#SERIAL port [[baudrate] flowcontrol]
SERIAL /dev/ttyS0 9600 0
#KBDMAP keymap
#DISPLAY filename
SAY Restore via CD/DVD and linux
#PROMPT flag_val
#F1 filename
prompt 1
timeout 1200
display message.txt
F1 message.txt
F2 f2.txt
F3 f3.txt
F4 f4.txt
-----------------------------------------------------------------------

Copy isolinux files from you slackware installation, not /isolinux/ as
in my example, copy your own kernel as bzImage to the root directory
and use you own initrd. Your kernel has to provide usb-mass storage
and scsi device support.

Btw. note to self, I should update my own bootmessages in message.txt
and f*.txt.

A working example is in my small cd image, I can provide more details.

have fun,cu Frank


--
"I never thought there could be anything worse than being all alone
in the night."
"But there is, being all alone in a crowd."
Reply With Quote