Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm a Linux newbie trying to do bigger things with Linux, i.e. completely customize my system...and I've just begun the process and run into two problems, the first I solved and it was an issue getting e2fsprogs-1.40.2 to install through the ../configure process (no automake was installed).
Sadly, I've only gotten to the second step of the process and have run into another problem involving the formatting and mounting of the LFS partition which on my system is /dev/sda3.
It was an unallocated partition (that I have since returned it to that state) and I partitioned it with fdisk using n and w at the proper times and providing all the specifics inbetween.
There are two problems I'm experiencing and the first is that niether mkfs or mke2fs will recognize that the partition exists, I keep getting an error that the partition does not exist in /etc/fstab or /etc/mtab.
So at first, I opted to used gparted in order to format the filesystem and I got it partitioned to ext2 (which opposed to the LFS book is my preference over ext3). At that point, I created the mount point /mnt/sda3 and tried to mount the partition with mount /dev/sda3. This was after I created the environmental variable export LFS=/dev/sda3
Can someone help put this in a bit greater perspective for me, although I'm sure the answer is obvious and am searching through my Linux Cert book for answers, it'd be quicker getting the system up if someone could point the yellow brick road out for me.
no i try not to get ahead of myself all thge time, and my friend, Jesus is not in the LFS book!!
LFS book says to do this: Choose a mount point and assign it to the LFS environment variable by running:
export LFS=/mnt/lfs
Next, create the mount point and mount the LFS file system by running:
mkdir -pv $LFS
mount -v -t ext3 /dev/<xxx> $LFS
exporting the environmental variable of course works fine, but issuing mkdir -pv i got
mkdir: missing operand
Try 'mkdir --help' for more information.
so i mkdir /mnt/sda3
This is to be my mount point
on the last command, mount -t -v ext2 (where i substituted because my fs type is ext2 not 3) /dev/sda3 i get this message:
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] ... : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
One can change the type of mount containing the directory dir:
mount --make-shared dir
mount --make-slave dir
mount --make-private dir
mount --make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
mount --make-rshared dir
mount --make-rslave dir
mount --make-rprivate dir
mount --make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .
so I read it!!
root@home-desktop:~# mount -L /dev/sda3
mount: no such partition found
and I presume this relates to the message I got earlier, no such partition in /etc/fstab or /etc/mtab
Did you issue the mount command the way you wrote it in your post?
Quote:
mount -t -v ext2 /dev/sda3
If so, you failed to provide a mount point and you have the -t and -v backwards (but you would get a different error message if you issued them in that order). The correct command is
Code:
mount -v -t ext2 /dev/sda3 $LFS
Did you verify that the variable LFS is set? What is the output of
Code:
echo $LFS
After you created the partition /dev/sda3, did you create a filesystem? It looks like you didn't based on the output of your command mount -L /dev/sda3.
yes i typed it as in the book, i'll try the other way around with t and v. when i hit echo $LFS I got a blank line on the command line
home@home-desktop:~$ echo $LFS
home@home-desktop:~$
i issued the command export LFS=/mnt/sda3 not export LFS=/mnt/sda3. Is this why I'm getting a blank line? I tried it again by reissuing the command and I got /mnt/sda3:
root@home-desktop:~# echo $LFS
/mnt/sda3
so is this a matter of time constraints? Do I need to make the variable permanent?
using mount -t -v ext2 /dev/sda3 I got this
root@home-desktop:~# mount -t -v ext2 /dev/sda3
mount: unknown filesystem type '-v'
I also tried using e2 and e2fs
I also used -F for S&G and got that the Special Device ext2 does not exist.
should I use the --bind option? I don't want to do anything prematurely so I'm asking, I have a bad history with Linux!
One thing I think is going to affect the outcome of the command once I get it right (with some help if sobeit) is that apparently the partitions (a swap and a rimary) are not listed in /etc/fstab or /etc/mtab. Can these be placed into the files manually as a configuration file would be edited?
Well, I got the filesystem mounted, it was definately a matter of that exported variable, I have no idea why it didn't export initially! I typed it as it states in the book so, thanks so much!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.