--- Em sáb, 1/12/12, Sagar Padhye escreveu:

> De: Sagar Padhye
> Assunto: [lfs-support] Not able to boot LFS : ext4 partition
> Para: lfs-support
> Data: Sábado, 1 de Dezembro de 2012, 9:06
> This is my first attempt to set up a
> LFS. I have used Version 
> SVN-20121122 for this. I have just finished the book with
> the given 
> instructions except following two.
>   1. Instead of preparing my LFS partition to be ext2
> or ext3, I chose 
> it to be ext4.
>   2. I didnt install LFS grub, instead I have updated
> grub of my host 
> system (ubuntu 12.10).
> 
> My HDD now looks like :
> $ sudo fdisk -l /dev/sda
>     Device Boot      Start         End      Blocks   Id  System
> /dev/sda1            2048    51199999    25598976   83
> Linux                    #LFS / ext4
> /dev/sda2   *    51200000    51589119      194560   83
> Linux                  #Ubuntu /boot ext3
> /dev/sda3        51589120    56276991     2343936   82  Linux swap /
> Solaris
> /dev/sda4        56279038   312580095   128150529    5  Extended
> /dev/sda5        56279040   116824063    30272512   83
> Linux               #Ubuntu /  ext4
> /dev/sda6       116826112   312580095    97876992   83
> Linux              #Shared /home ext4
> 
> 
> Part of my LFS kernel config looks like :
> CONFIG_EXT3_FS=y
> # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
> CONFIG_EXT3_FS_XATTR=y
> CONFIG_EXT3_FS_POSIX_ACL=y
> CONFIG_EXT3_FS_SECURITY=y
> CONFIG_EXT4_FS=m
> CONFIG_EXT4_USE_FOR_EXT23=y
> CONFIG_EXT4_FS_XATTR=y
> # CONFIG_EXT4_FS_POSIX_ACL is not set
> # CONFIG_EXT4_FS_SECURITY is not set
> # CONFIG_EXT4_DEBUG is not set
> # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
> 
> The EXT4 is compiled as kernel module.
> 
> The grub meny entry in ubuntu grub looks like :

You seem to have forgotten to paste the entry.

It seems that William Harrington have already the right answer, but as I
was sepending some time to write this, I will post it, perhaps it will
help aomeone in the future, or perhaps someone will help me in improving
what I am doing.

I usually do the following (I assume that you are running Ubuntu):

1. I have the directory /boot/grub/old (mkdir -vp /boot/grub/old) in
Ubuntu's partition.

2. cd /boot/grub/

3. Before upgrading Ubuntu's or LFS kernel, make a backup copy of that
good grub.cfg: cp -vau grub.cfg old/grub.cfg-before-`date +%Y.%m.%d`

4. After the kernel upgrade, make a new backup copy: cp -vau grub.cfg
old/grub.cfg-after-`date +%Y.%m.%d`

5. Edit grub.cfg and replace the entry for LFS by (replace <kernel
version> by the kernel used in LFS):

menuentry "GNU/Linux, with Linux <kernel version> (on /dev/sda1)" --class 
gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root <partition UUID>
    linux /boot/vmlinuz-<kernel version> root=/dev/sda1 ro
(the search line is not useful for LFS, as have been told by the
editors, I keep just to remember the form If anytime I change LFS's
boot procedures)

6. Just in case and for future eventual use, backup the good one: cp
-vau grub.cfg old/grub.cfg-good-`date +%Y.%m.%d`

I also make similar replacement for the "recovery mode" entry.

After doing that many times, I decided a more automatic way of doing
things.

I edited in Ubuntu the file /etc/grub.d/40_custom and
pasted the good entries for LFS after "# the 'exec tail' line above.":

# Start LFS<version>
 the lines for LFS
# End LFS<version>

Instead of doing step 4 above:

5a. When there is a kernel upgrade in Ubuntu I just delete the
automatically generated part corresponding to LFS.

5b. When I upgrade the kernel in LFS, I replace the LFS entry versions
by the new version number, in grub.cfg and in /etc/grub.d/40_custom.

> When I try to go into LFS, it (I am not sure what do I mean
> by 'it' - 
> grub / kernel :P) goes into panic state.
> 
> The points I could extract from error messages is, Somehow
> system is 
> trying to attempt and mount the '/' partition (/dev/sda1) as
> ext3 which 
> is incorrect.
> 
> Anyways I took a snap of my error screen when I try to boot
> LFS and kept 
> it at
> http://ubuntuone.com/3bLEHLy31YuLisa87A6AFB
> and
> https://picasaweb.google.com/lh/photo/E7NQ3tPJSxmb7Jq9moYlE9MTjNZETYmyPJy0liipFm0?feat=directlink


[]s,
Fernando
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to