[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lilo



On Sat, Dec 23, 2000 at 02:14:25PM +0200, Stefaans Mostert wrote:

:> dd if=<partition with LILO boot record> of=/dev/fd0 count=1
:> 
:> Alternatively change the line "boot=" in /etc/lilo.conf to point
:> at the floppy and then re-run LILO.

:Just another question.
:I have a /boot partition and if I dd it onto a stiffy will it fit?
:My biggest problem here is it must go to a machine that had it's mbr
:overwritten by doze

AFAIK, you can't dd a directory only a file (block special files like
/dev/sda2 qualify here)

The "Right Thing" is to read the bootfloppy HOWTO and build something
up with either LILO or loadlin.

The quick and dirty thing is to dump a raw kernel to disk then use
"rdev" to set where that kernel looks for the root partition.  For
example my machine mounts root from /dev/sda1, if I want to take my
kernel and boot a machine with root on /dev/hda1:

dd if=/boot/vmlinuz of=/dev/fd0
rdev /dev/fd0 /dev/hda1

you can set other various and sundry things with rdev as well

[jon@amergin jon]$ rdev -help
usage: rdev [ -rsv ] [ -o OFFSET ] [ IMAGE [ VALUE [ OFFSET ] ] ]
  rdev /dev/fd0  (or rdev /linux, etc.) displays the current ROOT
device
  rdev /dev/fd0 /dev/hda2         sets ROOT to /dev/hda2
  rdev -R /dev/fd0 1              set the ROOTFLAGS (readonly status)
  rdev -s /dev/fd0 /dev/hda2      set the SWAP device
  rdev -r /dev/fd0 627            set the RAMDISK size
  rdev -v /dev/fd0 1              set the bootup VIDEOMODE
  rdev -o N ...                   use the byte offset N
  rootflags ...                   same as rdev -R
  swapdev ...                     same as rdev -s
  ramsize ...                     same as rdev -r
  vidmode ...                     same as rdev -v
Note: video modes are: -3=Ask, -2=Extended, -1=NormalVga, 1=key1,
2=key2,...
      use -R 1 to mount root readonly, -R 0 for read/write.



The beauty of a LILO set up is that you can pass these (and other)
kernel params at boot time, which you cannot do with a raw disk.

-Jon



Reply to: