Re: writing to a partition
- From: "Mumia W." <paduille.4061.mumia.w+nospam@xxxxxxxxxxxxx>
- Date: Sun, 30 Sep 2007 13:08:38 -0500
On 09/30/2007 09:28 AM, Allan Adler wrote:
[...]
Am I correct in concluding that I can take any bootable floppy, for example, and execute (in Linux):
cat /dev/fd0 > /dev/hda1
to make hda1 bootable and put in lilo.conf, say,
No.
other=/dev/hda1
optional
label=abf
get the same effect as booting the bootable floppy, except that I would boot from /dev/hda1?
I guess I can also use dd to copy just a few bytes at a time to /dev/hda1 to see what it does, one step at a time, when it boots.
No.
Install the Linux-HOWTOs and read the Bootdisk-HOWTO and Linux-i386-Boot-Code-HOWTO
Install the Linux Kernel source and examine it. When you build a kernel, its header seems to look like an x86 bootsector which you might examine with a decompiler.
In the olden days of Linux, it used to be possible to create a boot floppy this way:
cp /vmlinuz /dev/fd0
rdev /dev/fd0 /dev/fd0
rdev -R /dev/fd0 1
Since you don't mind blowing this computer away, you could experiment with this:
cp /vmlinuz /dev/hda1
rdev /dev/hda1 /dev/hda1
rdev -R /dev/hda1 1
The partition at /dev/hda1 will be destroyed, but it will boot then freeze because there won't be any partition to mount (and the kernel modules needed for mounting won't be available). /vmlinuz could instead be any valid Linux kernel--even one from /boot.
.
- References:
- writing to a partition
- From: Allan Adler
- Re: writing to a partition
- From: Dan Espen
- Re: writing to a partition
- From: Allan Adler
- writing to a partition
- Prev by Date: yum update prob | FC7 and gcc
- Next by Date: Re: yum update prob | FC7 and gcc
- Previous by thread: Re: writing to a partition
- Next by thread: Re: writing to a partition
- Index(es):
Relevant Pages
|