public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Etienne Lorrain" <etienne.lorrain@masroudeau.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [i386 BOOT CODE] kernel bootable again
Date: Tue, 20 Sep 2005 18:13:25 +0100 (BST)	[thread overview]
Message-ID: <1847.192.168.201.6.1127236405.squirrel@pc300> (raw)

>>>> So if the "something" knows (or can get to know) the sector/tracks
>>>> layout of the disk it's writing the kernel onto, it could store this
>>>> information in the bootblock (is there space for that?). The bootblock
>>>> code would then just read this info and use it.
>
> Actually, DOS/Windows works that way. FAT filesystem stores the number
> of sectors per track in its boot sector.

  Gujin installer creates the filesystem (and the partition table if
 needed), the MBR with the disk geometry, and chain a simple bootloader
 or a menu based bootloader on the created FAT filesystem when told to
 do so.

  So if you just want to put a kernel and initrd on a floppy, and the
 floppy is big enough, you just do:
$ mkdir tmp
$ cd tmp
$ wget http://heanet.dl.sourceforge.net/sourceforge/gujin/install-1.2.tar.gz
$ tar xvzf install-1.2.tar.gz
$ ./instboot tiny.bin /dev/fd0
$ mcopy /boot/vmlinuz-2.6.13 a:
$ mcopy /boot/initrd-2.6.13 a:
  And you reboot with the floppy still inside the drive.

  If you want to put them on your USB thumb drive, and your PC can
 boot USB flash drives as a floppy (lot of BIOS bugs there), you
 just change the line (double check that your USB key is /dev/sda):
$ ./instboot tiny.bin /dev/fd0
  by:
$ ./instboot tiny.bin /dev/sda --disk=BIOS:0x00 --geometry=/dev/sda

  I personnally better like a partition table on my USB drives, so
 I am more used to erase manually the partition table:
$ dd if=/dev/null of=/dev/sda bs=512 count=64 # blank the head of the disk
 and then type:
$ ./instboot boot.bin /dev/sda --disk=BIOS:0x00 --geometry=/dev/sda \
     --mbr-device=/dev/sda --partition_index=1

  When booted from this key, the PC will boot the kernel named vmlinuz*
 and load the initrd/initramfs named initrd* (tiny.bin does not contain
 the graphic menu management).

  I will not say that I tested it lately, but you may also want to put
 your kernel and initrd on a bootable CDROM - without having the usual
 Gujin menu - then you just do:
$ mkdir tmpdir
$ cp /boot/vmlinuz-2.6.13 tmpdir
$ cp /boot/initrd-2.6.13 tmpdir
$ ./instboot tiny.bin tmpdir/tiny.bcd
$ mkisofs -untranslated-filenames -no-emul-boot -boot-load-size 4 \
    -b tiny.bcd tmpdir -o boot.iso
$ cdrecord boot.iso

  It is usually better (and will work for all those configuration)
 to put the kernel and its initrd inside a directory named "/boot",
 but I am highjicking a thread so want to keep it simple...

  Etienne.


             reply	other threads:[~2005-09-20 17:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-20 17:13 Etienne Lorrain [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-09-13 13:46 [i386 BOOT CODE] kernel bootable again Pascal Bellard
2005-09-13 19:04 ` Frank Sorenson
2005-09-13 19:42   ` H. Peter Anvin
2005-09-14  9:42     ` Pascal Bellard
2005-09-14  9:55       ` Martin Mares
2005-09-14 16:38       ` H. Peter Anvin
2005-09-17 15:26       ` Giuseppe Bilotta
2005-09-17 15:56         ` Jesper Juhl
2005-09-17 16:19           ` Giuseppe Bilotta
2005-09-19  2:13             ` Coywolf Qi Hunt
2005-09-14  9:52   ` Pascal Bellard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1847.192.168.201.6.1127236405.squirrel@pc300 \
    --to=etienne.lorrain@masroudeau.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox