LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 08-02-2008, 06:50 PM   #1
ikon2008
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Rep: Reputation: 0
Post Step Two of LFS Book 6.03


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.

This is /etc/fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=f583a940-b6a5-431f-a731-5b8d0e621499 / ext2 relatime,errors=remount-ro 0 1
# /dev/sda2
UUID=b63761cc-833e-4dfc-84f7-9423af61148d none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
~
~

Last edited by ikon2008; 08-02-2008 at 06:58 PM.
 
Old 08-02-2008, 10:37 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Have you read section 1.5 of the LFS book? Specifically look at subsection 1.5.1, fourth bullet.
 
Old 08-03-2008, 05:45 PM   #3
ikon2008
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
...

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

Last edited by ikon2008; 08-03-2008 at 06:16 PM.
 
Old 08-03-2008, 07:55 PM   #4
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
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.
 
Old 08-03-2008, 08:09 PM   #5
ikon2008
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
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!

Last edited by ikon2008; 08-03-2008 at 08:34 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS step 5.7 Shadows91 Linux From Scratch 2 01-01-2007 10:12 PM
cannot configure gcc. LFS step 5.4. tech9ic Linux From Scratch 1 08-02-2006 01:01 PM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM
Step 4.4 of LFS 6.0: Setting up the Environment dimaash Linux From Scratch 2 07-17-2005 11:18 PM
LFS 3.2 book, but LFS packages 3.0 CragStar Linux From Scratch 2 04-07-2002 03:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration