> > I'd guess the right one is /dev/sda2, and suspect a bug in "df" when 
> > in chroot. You should know what you typed when you mounted /mnt/lfs: 
> > the right partition is the one you gave to this command.
> >

Thanks for the answer Pierre.

> >
> Just a friendly reminder.
> 
> The purpose of "df" is to show the available space in *mounted* 
> filesystems.  The command <df -h>, here df has no argument, show the 
> space available on all mounted *filesystems.*  Its output is filesystems 
> and not devices.
> 
> I think what you're looking for is a utility to list the partition table 
> of your machine.  <parted -l> will give you that list. I suggest parted 
> and not fdisk because I don't think fdisk recognizes gpt partitions 
> yet.  If you know that your partition table is *not* gpt, fdisk will 
> work fine.
> 
> Using df to help write /etc/fstab is a good idea.  But if you want all 
> of your partitions in it, df won't give you the complete picture.
> 

I think you are right Dan, but parted is not installed (yet) in my LFS :-) .


Regarding the output of the 'cat /proc/mounts in my case I have exactly the 
same output when in chroot 
and when in normal host, I guess because, it is a copy of the normal host as 
per step '6.2.3. Mounting Virtual Kernel File Systems' (if someone knows 
better, please, correct me).


One thing that I noticed in my lfs, is that /proc/mounts in normal host shows 
me this for my lfs partition

/dev/sda2 /mnt/lfs ext4 rw,relatime,barrier=1,data=ordered 0 0

and mount returns this

/dev/sda2 on /mnt/lfs type ext4 (rw)


when in chroot /proc/mounts returns

/dev/sda2 / ext4 rw,relatime,barrier=1,data=ordered 0 0

and mount returns 

/dev/sda2 on / type ext4 (rw,relatime,barrier=1,data=ordered)

which looks correct to me as it matches the normal host output.

The thing changes when running df -h 

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       9.2G  4.1G  4.6G  48% /

The info is correct but this time the partition name changed to /dev/sda1 and 
that is where my problem started 
and why I started this thread. I don't know if this is an expected behavior 
when df is run under chroot...


Marcos
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to