Am 01.07.2010 09:27, schrieb Nathan Coulson:
> On Wed, Jun 30, 2010 at 11:24 PM, splotz90<sebastian-pl...@web.de>  wrote:
>>   Am 01.07.2010 05:17, schrieb Bruce Dubbs:
>>> I'll ask the question again. How is search useful in an LFS
>>> environment where we don't have initrd available?
>> As I already said:
>>
>> The search command is only useful if we're using a seperate boot
>> partition ...
>>
>> With help of the search line, GRUB can find the boot partition, even if
>> the device of the boot partition has changed (for example /dev/sda3 -->
>> /dev/sda4).
>> After that, GRUB will boot the kernel. The kernel can mount the root
>> partition.
>>
>> If the device of the root partition has changed (for example /dev/sda1
>> -->  /dev/sda2) the boot process will fail (the kernel won't be able to
>> boot the root partition).
>>
>> But we have to use a LABEL or UUID entry for the boot partition in
>> /etc/fstab (if we're using something like /dev/sda1 if fstab, the mount
>> of the boot partition will fail).
> no you dont.  / is already mounted.  If you say it's in /dev/sdz65,
> it'll be fine.
>
> After it boots (when it hits the bootscripts),
> /etc/rc.d/init.d/checkfs has a "mount / -o remount,ro'.  It does not
> parse /etc/fstab as / is already mounted
>
> Next time, fstab is used is in mountfs.  This is where LABEL or UUID
> is useful for all partitions "except" /.
>
> Infact, if you boot with root=/bin/bash,  / is still mounted, and
> /etc/fstab will never have been read
>
>> This means: If the LFS-User changes the device for the boot partition,
>> the system will still boot (with help of the search line).
>>
>> So I suggest that we are writing the following:
>>
>>
>> "The search lines are only meaningful for LFS systems if a separate boot
>> partition and a LABEL or UUID entry for this partition in /etc/fstab is
>> used."
> /etc/fstab is only useful "after" / is mounted.  so I would remove the
> part that says "separate boot partition and a LABEL or UUID entry for
> this partition in /etc/fstab is used."  (the rest of the sentence does
> not stand well on it's own though).
>
> the linux kernel has to mount something as /  and all it has to work
> with are (a) root=, or (b) the drive/partition# embedded at
> compiletime.
>
>> I think, I've started a big discussion with just one small ticket ;-)
>
>
I think you've understood me wrong ...

Here is an example:

/dev/sda1 --> LFS-system ( / partition)
/dev/sda2 --> unformatted partition
/dev/sda3 --> boot partition ( /boot)

the fstab:

...
/dev/sda1 /            ext3    defaults    1    1
/dev/sda3    /boot    ext3    defaults    1    1
...

If the LFS-user decides to delete the unused partition (/dev/sda2) we 
will have the following:

/dev/sda1 --> LFS-system ( / partition)
/dev/sda2 --> boot partition ( /boot)

But if we are still using /dev/sda3 for /boot in fstab, the mount of the 
boot partition will fail (/dev/sda3 doesn't exist anymore).

This fstab would be better:

...
/dev/sda1                                                             
             /            ext3    defaults    1    1

# boot partition:
UUID=03b77228-ed4c-4218-910e-11b9f77c4b46    /boot        ext3    
defaults    1    1
...

I don't want to use a UUID for / in the fstab ...

Sebastian
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to