[Freedos-user] Re: booting freedos from a USB stick

2005-02-07 Thread Robert Urban

Hi Eric,

You wrote:
 Hi, for using Linux to make an USB stick bootable, please do the following:
 Use fdisk to mark the partition on the stick as active / bootable
 Copy FreeDOS files to the partition, at least command com and kernel sys
 (can be found e.g. on http://fdos.org/kernel/ and freedos.sourceforge.net)
 Use my tool to write a boot sector to the partition on the stick:
 http://www.coli.uni-sb.de/~eric/stuff/soft/specials/sys-freedos-linux.zip

hmm.

I tried the following:

- cleared any partition information:
dd if=/dev/zero of=/dev/sdb bs=8k count=2
- created new partition-table:
fdisk /dev/sdb
- created primary partition 1 and marked as bootable

fdisk output:
Command (m for help): p

Disk /dev/sdb: 255 MB, 255852544 bytes
8 heads, 61 sectors/track, 1024 cylinders
Units = cylinders of 488 * 512 = 249856 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   *   11024  249825+   6  FAT16

Command (m for help): x

Expert command (m for help): p

Disk /dev/sdb: 8 heads, 61 sectors, 1024 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl Start  Size ID
 1 80   1   10   7  61 1023 61 499651 06
 2 00   0   00   0   00  0  0 00
 3 00   0   00   0   00  0  0 00
 4 00   0   00   0   00  0  0 00

- create new FAT16 filesystem:
mkdosfs -F 16 /dev/sdb1

- tried to run sys-freedos.pl:
sys-freedos.pl --disk=/dev/sdb
which reports: not 512 bytes per sector

What does this complaint mean?

Robert Urban

 This should work in forced fdd boot style. For virtual zip or virtual
 harddisk modes, you may have to do extra boot sector adjustments as
 mentioned in my tool. For virtual CD or virtual floppy mode, you would
 have to overwrite the stick with a CD or floppy image, which would destroy
 the partition scheme on it, so it is no good idea...
 
 Some BIOSes allow you to select different boot styles, while others
 auto-select. I know at least one BIOS which only does forced fdd mode,
 so there is nothing to configure anyway.
 
 Please try this method, and forward it to the freedos-user thread which
 you started, after adding your comments. Thanks.
 
 Eric
 




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


[Freedos-user] Re: booting freedos from a USB stick

2005-02-08 Thread Robert Urban

Tach Eric,

You wrote:
  I tried the following:
  - cleared any partition information:
  dd if=/dev/zero of=/dev/sdb bs=8k count=2

um, well, it actually *was* necessary, as I had, in earlier attemps, munged
the old partition table :

 That would not have been necessary :-(.
 
  - created new partition-table:
  fdisk /dev/sdb
  - created primary partition 1 and marked as bootable
 
 It would have been enough to mark the EXISTING primary FAT
 partition as bootable, WITHOUT formatting and repartitioning everything :-(.

see above :)

  - tried to run sys-freedos.pl:
  sys-freedos.pl --disk=/dev/sdb
  which reports: not 512 bytes per sector
 
 Yikes. You tried to overwrite the MBR with a boot sector. The correct
 disk to use is /dev/sdb1, NOT /dev/sdb. You only write a boot sector
 to the FAT partition sdb1.
 
 And you do NOT have to mkdosfs /dev/sdb1 either. The USB stick already
 came with:
 - proper partition information
 - proper MBR
 - proper FAT formatted partition
 and you only have to add
 - bootable flag in partition information
 - boot sector in FAT partition
 
 Never touch a running system - in particular, you should assume that
 the MBR, partition information and FAT filesystem which are on the
 USB stick when it leaves the factory are just fine. Probably BETTER
 that those which can be created by Linux fdisk / mkdosfs. Only change
 what HAS to be changed: Mark the partition as bootable and create a
 FreeDOS boot sector. And of course copy the files (e.g. kernel, shell)
 to the partition (mount the partition or use mcopy).
 
 So again, do not dd, do not delete partitions, do not mkdosfs...
 and use, IF your FAT partition on USB stick is /dev/sdb1, the
 perl sys-freedos.pl --disk=/dev/sdb1 command to install a boot sector.

I see your point, and in the future I will use the existing config on a
USB stick.  On the other hand, when I'm looking for the solution to a
problem, and I come across one somewhere in which the author has
described a solution starting from an assumed existing configuration
that I don't have, I get *very* frustrated.  I think it's always better
to describe completely how to solve a problem, from first principles, so
to speak.  In such a description one can, and probably should, include
the recommendation not to overwrite exising MBR/PT information...

So how to I get an decent MBR onto the stick now??? :( Grub?

cheers,

Rob Urban

 You may want to try different boot settings in your BIOS setup, too,
 but some BIOSes simply do not allow a specific setting apart from the
 mere boot from USB one.



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


[Freedos-user] Re: USB stick boot solution...

2005-02-08 Thread Robert Urban

Hi Eric,

Here's what I tried:

- fdisk /dev/sdb
 - set partition 1 to FAT12 and bootable

- dd of mbr.bin (from syslinux) to /dev/sdb
  dd if=mbr.bin of=/dev/sdb

- create FAT12 filesystem on sdb1:
  mkdosfs -F 12 /dev/sdb1

- create bootsector using your tool:
  ./sys-freedos.pl --disk=/dev/sdb1
  DOS boot sector for /dev/sdb1 will be created by:
nasm -o /dev/stdout -dISFAT12  ./bootsecs/boot.asm
  Using FAT12, boot code starts at offset 3e. Extended info: drive 0,
  res. 0, sig. 29, serno 4208-C9C4, name [   ], type [FAT12   ].
  Boot sector successfully updated.

- mount sdb1

- copy kernel.sys and command.com to sdb1

- umount sdb1

- try to boot...

I get the string FreeDOS and nothing more :(.

- I also tried using the --lba flag with sys-freedos.pl, but result
  was same.

cheers,

Rob Urban

You wrote:
 now that you already overwrote things, it is of course okay to use
 fdisk and mkdosfs as you did. The only problem is that you gave the
 wrong --disk argument value to sys-freedos.pl ...
 
 Try that and check how far you get.
 If you really need a fresh partition table, try the one from
 http://syslinux.zytor.com/
 
 (Partition table - file mbr.bin in the syslinux download)




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Re: USB stick boot solution...

2005-02-09 Thread Robert Urban


Hi Bernd,

if schreef is the simple past for wrote, was is the present... shrijfen? :)

Part of the reason I'm trying to make a USB-stick bootable is to be able
to have a *writeable* removable medium, for example to be able to save
a backup copy of the running BIOS image before flashing.

Using your method, I would get a ramdisk with the FreeDOS boot floppy
in memory, which would mean it would be quite difficult to save the old
BIOS image.  In fact, I have already got a method working for booting
over the network, which uses pxegrub and memdisk, to more-or-less do
what you describe, but via network rather than USB-stick.  If you are
interested, I documented the method under:

http://www.unix-wissen.de/linux/BiosUpdate/index.html

Nevertheless I appreciate your suggestion, and will give it due consideration.

cheers,

Robert Urban

Bernd Blaauw schrieb:
 Robert Urban schreef:
  I assumed that USB-ZIP was for Iomega zip drives attached by USB.  In any c
ase,
  I tried it, with results identical to USB-FDD and USB-CDROM  -- it ignored
  the USB-stick.
 
 Syslinux,
 http://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/syslinux-3.08-pre
5.zip
 contains a 'readme.usbkey' textdocument and a script (mkdiskimage) for 
 initialising an USB Disk into 'ZIP geometry'.
 
 Please try.
 Execute the script with correct parameters,
 and install Syslinux to it.
 
 if you want to boot FreeDOS from your USB key,
 get several files from 
 http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/beta9sr
1/fdos1440.img
 
 the fdos1440.img contains a Syslinux configuration file (syslinux.cfg),
 the MEMDISK program (to load a disk image into RAM and let it act as 
 actual floppydisk) and FDBOOT.IMG (the FreeDOS diskette image file I use).
 Other stuff might also be interesting, like Smart Boot Manager.
 
 syntax for booting this fdboot.img file:
 
 label freedos
 kernel memdisk
 append initrd=fdboot.img
 
 Bernd
 
 
 ---
 SF email is sponsored by - The IT Product Guide
 Read honest  candid reviews on hundreds of IT Products from real users.
 Discover which products truly live up to the hype. Start reading now.
 http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
 ___
 Freedos-user mailing list
 Freedos-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/freedos-user


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Re: USB stick boot solution...

2005-02-09 Thread Robert Urban
Hi Michael,

You wrote:
 At 02:48 PM 2/9/2005 +0100, Robert Urban wrote:
 
  
   USB-ZIP is generally documented on the net as the most compatible one to
   choose for USB flash drive booting.  It's the only selection that works 
  for
   booting my USB stick here.  But mine does boot up as a large A:, which you
   might not find acceptable.
 
 I assumed that USB-ZIP was for Iomega zip drives attached by USB.  In any 
 case,
 I tried it, with results identical to USB-FDD and USB-CDROM  -- it ignored
 the USB-stick.
 
 Not sure why you're having so many problems, although I admit that I hand 
 punched in a few values in the boot sector to make sure mine 
 booted.  What's the brand and size of your flash drive?  If I see one 
 locally and its cheap enough, maybe I'll grab it and see if it's bootable 
 here.  When first reading up on the subject on the net, I saw a passing 
 comment of some flash drives being unbootable, although that could have 
 been operator error, of course.

from /var/log/messages:
Feb  9 03:55:51 noisy kernel:   Vendor: IBM   Model: Memory Key  Rev: 
3.52
Feb  9 03:55:52 noisy kernel: SCSI device sdb: 499712 512-byte hdwr sectors 
(256MB)

on the stick it says:

FC CE
MADE IN CHINA
ASM 22P9027
FRU 22P9031
2004APR26

cheers,

Rob



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user