keyongtech


  keyongtech > linux.security

 #1  
01-03-09, 10:15 PM
shrike
Howdy,

read somewhere I should put /boot on a separate partition and make it
read only in fstab. Cool, but how does this effect lilo and RAID?

If I create:

/dev/hda1
/dev/hda2
/dev/hda3

/dev/hdb1
/dev/hdb2
/dev/hdb3

as RAID autodetect partitions,

and then:

mdadm --create /dev/md1 --level 1 --raid-devices 2 /dev/hda1 /dev/
hdb1
mdadm --create /dev/md2 --level 1 --raid-devices 2 /dev/hda2 /dev/hdb2
mdadm --create /dev/md3 --level 1 --raid-devices 2 /dev/hda3 /dev/
hdb3

Now, presuming md1 is swap, md2 is /boot, and md3 is /,

Which of the /dev/hd? partitions do I have to make bootable if any?
And which /dev/md? partition do I point lilo at? Is lilo smart enough
to read fstab and mount /boot? Or do I have to tell lilo something
special so that it knows my boot partition is separate?

Thanks
 #2  
01-03-09, 11:01 PM
GangGreene
On Sat, 03 Jan 2009 14:15:49 -0800, shrike wrote:

[..]
>
> and then:
>
> mdadm --create /dev/md1 --level 1 --raid-devices 2 /dev/hda1 /dev/ hdb1
> mdadm --create /dev/md2 --level 1 --raid-devices 2 /dev/hda2 /dev/hdb2
> mdadm --create /dev/md3 --level 1 --raid-devices 2 /dev/hda3 /dev/ hdb3
>
> Now, presuming md1 is swap, md2 is /boot, and md3 is /,
>
> Which of the /dev/hd? partitions do I have to make bootable if any?


None, this is not windows. Linux doesn't need a partition to be set
bootable, only brain dead operating systems do.

> And which /dev/md? partition do I point lilo at?


None see below

> Is lilo smart enough to
> read fstab and mount /boot? Or do I have to tell lilo something special
> so that it knows my boot partition is separate?
>


Use grub and install grub on /dev/hda and /dev/hdb.
Grub will boot /dev/hda2

That way if /dev/hda fails you can move /dev/hdb to /dev/hda and boot

Have a look here:

http://wiki.archlinux.org/index.php/...re_RAID_or_LVM

It's writtten for ArchLunix so YMMV

> Thanks


Your welcome.
 #3  
01-03-09, 11:18 PM
Lew Pitcher
On January 3, 2009 17:15, in comp.os.linux.security, shrike
(shrike) wrote:

> Howdy,
>
> read somewhere I should put /boot on a separate partition and make it
> read only in fstab.


I've been doing this for years and years, and I've never encountered any
problems.

> Cool, but how does this effect lilo and RAID?

[snip]
> Now, presuming md1 is swap, md2 is /boot, and md3 is /,


> Which of the /dev/hd? partitions do I have to make bootable if any?


None. Neither LILO nor GRUB require that a partition be marked
as "bootable".

> And which /dev/md? partition do I point lilo at?

I've not used RAID in a while, but I believe that you want
boot = /dev/md2
root = /dev/md3
in your lilo.conf

> Is lilo smart enough to read fstab and mount /boot?


No. LILO doesn't read fstab or mount boot. lilo(8) builds instructions to
access the files (by absolute block number) in the partitions you name in
your lilo.conf, and stores these instructions in your LILO boot block. The
LILO boot block simply reads specified blocks from specified partitions (it
knows nothing of files, directories or mountpoints), and runs the resulting
binary.

> Or do I have to tell lilo something special so that it knows my boot
> partition is separate?


You specify where your boot partition is in /etc/lilo.conf, and lilo(8)
builds the appropriate block load list based on that partition.
 #4  
01-03-09, 11:43 PM
shrike
On Jan 3, 6:18 pm, Lew Pitcher <lpitc> wrote:
> On January 3, 2009 17:15, in comp.os.linux.security, shr...@cyberspace.org
>
> (shr...@cyberspace.org) wrote:
> > Howdy,

>
> > read somewhere I should put /boot on a separate partition and make it
> > read only in fstab.

>

-SNIP-

> I've not used RAID in a while, but I believe that you want
>   boot = /dev/md2
>   root = /dev/md3
> in your lilo.conf
>
> > Is lilo smart enough to read fstab and mount /boot?

>
> No.


-SNIP-

Then do I have to point at vmlinuz as a relative path or a fully
qualified path on the boot partition? (Is lilo going to consider /dev/
md2 the logical root when looking for the kernel?)

wouldn't happen to have an example lilo.conf sample with the split
root/boot you'd be willing to post would you?

> --
> Lew Pitcher
>
> Master Codewright & JOAT-in-training | Registered Linux User #112576http://pitcher.digitalfreehold.ca/  | GPG public key available by request
> ----------      Slackware - Because I know what I'm doing.          ------


Thanks in advance!
 #5  
01-04-09, 12:00 AM
Lew Pitcher
On January 3, 2009 18:43, in comp.os.linux.security, shrike
(shrike) wrote:

> On Jan 3, 6:18 pm, Lew Pitcher <lpitc> wrote:
> -SNIP-
>
>
> -SNIP-
>
> Then do I have to point at vmlinuz as a relative path or a fully
> qualified path on the boot partition?


Fully qualified path.



> (Is lilo going to consider /dev/md2 the logical root when looking forthe
> kernel?)




> wouldn't happen to have an example lilo.conf sample with the split
> root/boot you'd be willing to post would you?


My thoughts exactly. While I don't use RAID, I do keep my /boot on a
separate partition from root. Here's a peak at my fstab

$ cat /etc/fstab
/dev/hda3 swap swap defaults 0 0
/dev/hdb3 swap swap defaults 0 0
/dev/hda2 / ext3 defaults 1 1
tmpfs /tmp tmpfs defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/hda1 /boot ext2 defaults,ro 1 2

and here's my lilo.conf
$ cat /etc/lilo.conf
# Start LILO global section
boot = /dev/hda
install = /boot/boot-text.b
delay = 50
timeout = 1200
change-rules
reset
vga = normal
# End LILO global section
image = /boot/vmlinuz
root = /dev/hda2
label = linux
read-only

Hope this helps
 #6  
01-04-09, 12:02 AM
David W. Hodgins
On Sat, 03 Jan 2009 18:43:26 -0500, shrike <shrike> wrote:

> Then do I have to point at vmlinuz as a relative path or a fully
> qualified path on the boot partition? (Is lilo going to consider /dev/
> md2 the logical root when looking for the kernel?)
>
> wouldn't happen to have an example lilo.conf sample with the split
> root/boot you'd be willing to post would you?


There is not difference in the lilo.conf, due to having /boot on a seperate
partition.

Here's a boot stanza that I'm currently using ...
image=/boot/vmlinuz-2.6.27.10-0.uc2mnbcustom
label="2.6.27.10-0.uc2mnbcustom"
root=/dev/sda8
initrd=/boot/initrd-2.6.27.10-0.uc2mnbcustom.img
append="resume=/dev/sda10 apparmor=1"
vga=794


Note that the /boot partition must be mounted (using the directory /boot,
in the root filesystem as a mount point), when lilo is run.

The only time you would need to remount /boot as rw, is when you want to
install a new kernel, or if using grub, change the grub menu.

Regards, Dave Hodgins
 #7  
01-04-09, 10:00 AM
Eric
David W. Hodgins wrote:

[..]
>> Note that the /boot partition must be mounted (using the directory /boot,

> in the root filesystem as a mount point), when lilo is run.
>
> The only time you would need to remount /boot as rw, is when you want to
> install a new kernel, or if using grub, change the grub menu.
>
> Regards, Dave Hodgins
>

Hey Dave,
OT:
Arent you a little worried about using the .27 release? Wasnt
there a bug in some module that corrupted the nic card's eeprom?
Eric
 #8  
01-04-09, 11:55 AM
trselmer
shrike wrote:
> On Jan 3, 6:18 pm, Lew Pitcher <lpitc> wrote:
>
> wouldn't happen to have an example lilo.conf sample with the split
> root/boot you'd be willing to post would you?
>

# cat /etc/fstab:

/dev/sda3 swap swap defaults,pri=1 0 0
/dev/sdb3 swap swap defaults,pri=1 0 0
/dev/md1 / ext3 defaults 1 1
/dev/md0 /boot ext2 defaults 1 2
/dev/md2 /home ext3 defaults 1 2

# cat /etc/lilo.conf

# Start LILO global section
boot = /dev/md0
raid-extra-boot="/dev/sda,/dev/sdb"
lba32
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/md1
label = 2.6.24.5-smp
read-only
# Linux bootable partition config ends
 #9  
01-04-09, 09:37 PM
David W. Hodgins
On Sun, 04 Jan 2009 05:00:59 -0500, Eric <erbenton> wrote:

> Arent you a little worried about using the .27 release? Wasnt
> there a bug in some module that corrupted the nic card's eeprom?


It didn't affect the via nic I have, and has been fixed. See
http://blog.mandriva.com/2008/09/23/...-pre-releases/ for details.

Regards, Dave Hodgins
Similar Threads
Thread Thread Starter
making dual boot single boot

I want to uninstall Windows XP and keep win98 SE. (it is a dual boot system) Whot is the best way of going about it? Use sys c: on the Win 98 bootup floppy?

oer
DVD question - will a DVD boot ? can a ghost PCDOS boot floppy read DVDs ?

I have several DOS floppies that I use to boot up ghost (V6.51) or Win98 etc. It loads the CD DOS drivers and CDs work fine. Now that I have a HP635i DVD writer, I would...

- Bobb -
Help ! Failed boot disk ? Short read 0x2000 chars read

Hello, Solaris 2.6 on a Sun UE450. Yesterday, we had a big power loss here and the UPS/Generator combo did not work. All the servers loss power. We're not a 24/7 shop, so I...

G Dahler
Making a Boot CD for XP Pro

I have 2 XP Pro computers. One with SP-1 has gotten stuck in a boot up loop due to a user profile problem. The other has the SP2 upgrade. Both computers were built my the...

Walt Mather
Making mde fe read only

Just tried another experiment where I made my mde front end read only through its windows file properties. I had to add code in the error handling routine for the...

Stephen J. Levine MD

Privacy Policy | All times are GMT. The time now is 04:23 PM.

Merging Information Logo
[Deutschland] [Espańa] [France] [Italia] [Nederland] [Polska] [United Kingdom]