How do I create a proper /etc/fstab file for my LFS partition?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I'm trying to create an appropriate /etc/fstab file for my LFS partition, as in LFS part 8.2. How do I find out the file systems for my / mount-point and my swap mount point ( and )? And how do I find out the type of my / mount-point? I'm using a Ubuntu 17.04 host, and this is what I'm using as a model (pasted below).
cat > /etc/fstab << "EOF"
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/<xxx> / <fff> defaults 1 1
/dev/<yyy> swap swap pri=1 0 0
proc /proc proc nosuid,noexec,nodev 0 0
sysfs /sys sysfs nosuid,noexec,nodev 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
# End /etc/fstab
EO
ubuntu fstab lfs
add a comment |Â
up vote
1
down vote
favorite
I'm trying to create an appropriate /etc/fstab file for my LFS partition, as in LFS part 8.2. How do I find out the file systems for my / mount-point and my swap mount point ( and )? And how do I find out the type of my / mount-point? I'm using a Ubuntu 17.04 host, and this is what I'm using as a model (pasted below).
cat > /etc/fstab << "EOF"
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/<xxx> / <fff> defaults 1 1
/dev/<yyy> swap swap pri=1 0 0
proc /proc proc nosuid,noexec,nodev 0 0
sysfs /sys sysfs nosuid,noexec,nodev 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
# End /etc/fstab
EO
ubuntu fstab lfs
blkid
is your friend! Also if you used archlinux, genfstab works in LFS (it's a simple bash script to generate a fstab).
â cylgalad
Oct 2 '17 at 8:37
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to create an appropriate /etc/fstab file for my LFS partition, as in LFS part 8.2. How do I find out the file systems for my / mount-point and my swap mount point ( and )? And how do I find out the type of my / mount-point? I'm using a Ubuntu 17.04 host, and this is what I'm using as a model (pasted below).
cat > /etc/fstab << "EOF"
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/<xxx> / <fff> defaults 1 1
/dev/<yyy> swap swap pri=1 0 0
proc /proc proc nosuid,noexec,nodev 0 0
sysfs /sys sysfs nosuid,noexec,nodev 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
# End /etc/fstab
EO
ubuntu fstab lfs
I'm trying to create an appropriate /etc/fstab file for my LFS partition, as in LFS part 8.2. How do I find out the file systems for my / mount-point and my swap mount point ( and )? And how do I find out the type of my / mount-point? I'm using a Ubuntu 17.04 host, and this is what I'm using as a model (pasted below).
cat > /etc/fstab << "EOF"
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/<xxx> / <fff> defaults 1 1
/dev/<yyy> swap swap pri=1 0 0
proc /proc proc nosuid,noexec,nodev 0 0
sysfs /sys sysfs nosuid,noexec,nodev 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
# End /etc/fstab
EO
ubuntu fstab lfs
ubuntu fstab lfs
asked Oct 1 '17 at 19:31
fgjt
83
83
blkid
is your friend! Also if you used archlinux, genfstab works in LFS (it's a simple bash script to generate a fstab).
â cylgalad
Oct 2 '17 at 8:37
add a comment |Â
blkid
is your friend! Also if you used archlinux, genfstab works in LFS (it's a simple bash script to generate a fstab).
â cylgalad
Oct 2 '17 at 8:37
blkid
is your friend! Also if you used archlinux, genfstab works in LFS (it's a simple bash script to generate a fstab).â cylgalad
Oct 2 '17 at 8:37
blkid
is your friend! Also if you used archlinux, genfstab works in LFS (it's a simple bash script to generate a fstab).â cylgalad
Oct 2 '17 at 8:37
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
as per lfs book description:
Replace
<xxx>
,<yyy>
, and<fff>
with the values appropriate for the
system, for example, sda2, sda5, and ext4.
your root partition described by:
/dev/<xxx> / <fff> defaults 1 1
is the same partition you set up in chapter "2.4. Creating a New Partition", and later mounted as your $LFS
(by default /mnt/lfs
). and as per book description it's something like /dev/sda5
.
type of root partition (<fff>
in fstab example) was set by you in chapter "2.5. Creating a File System on the Partition". by default it is ext4
.
if unsure, you can use mount
command from your host. wihout any options it returns all mounted partitions, so you look for something like:
/dev/sda9 on /mnt/lfs type ext4 (rw,relatime,data=ordered)
in my case it is device /dev/sda9
and type is ext4
, and that's what i put in my fstab for <xxx>
and <fff>
.
swap partition described by:
/dev/<yyy> swap swap pri=1 0 0
was probably already on your ubuntu host, so you didn't set it up in chapter 2. but we can again look it up in already mounted partitions.
command mount | grep swap
will show you only mounted swap partitions. and again, you take device name and substitute <yyy>
for it :)
rest of the fstab file you leave as it is in the example, should work without any more changes.
add a comment |Â
up vote
-1
down vote
I am not familiar with LFS. But, the "mount" command does a good job of guessing what file system is on the partition. Create a mount point for the partition, mount it, then run the mount command again.
# mkdir -p /mnt/hd
# mount /dev/sdb1 /mnt/hd
# mount
The output of the last command should look something like this:
/dev/sda6 swap swap defaults 0 0
/dev/sda8 / ext4 defaults 1 1
/dev/sda5 /mnt/old ext4 defaults 1 2
/dev/sda7 /usr/src/ ext4 defaults 1 2
/dev/sda9 /var/log ext4 defaults 1 2
/dev/sdb1 /home ext4 defaults 1 2
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
as per lfs book description:
Replace
<xxx>
,<yyy>
, and<fff>
with the values appropriate for the
system, for example, sda2, sda5, and ext4.
your root partition described by:
/dev/<xxx> / <fff> defaults 1 1
is the same partition you set up in chapter "2.4. Creating a New Partition", and later mounted as your $LFS
(by default /mnt/lfs
). and as per book description it's something like /dev/sda5
.
type of root partition (<fff>
in fstab example) was set by you in chapter "2.5. Creating a File System on the Partition". by default it is ext4
.
if unsure, you can use mount
command from your host. wihout any options it returns all mounted partitions, so you look for something like:
/dev/sda9 on /mnt/lfs type ext4 (rw,relatime,data=ordered)
in my case it is device /dev/sda9
and type is ext4
, and that's what i put in my fstab for <xxx>
and <fff>
.
swap partition described by:
/dev/<yyy> swap swap pri=1 0 0
was probably already on your ubuntu host, so you didn't set it up in chapter 2. but we can again look it up in already mounted partitions.
command mount | grep swap
will show you only mounted swap partitions. and again, you take device name and substitute <yyy>
for it :)
rest of the fstab file you leave as it is in the example, should work without any more changes.
add a comment |Â
up vote
0
down vote
accepted
as per lfs book description:
Replace
<xxx>
,<yyy>
, and<fff>
with the values appropriate for the
system, for example, sda2, sda5, and ext4.
your root partition described by:
/dev/<xxx> / <fff> defaults 1 1
is the same partition you set up in chapter "2.4. Creating a New Partition", and later mounted as your $LFS
(by default /mnt/lfs
). and as per book description it's something like /dev/sda5
.
type of root partition (<fff>
in fstab example) was set by you in chapter "2.5. Creating a File System on the Partition". by default it is ext4
.
if unsure, you can use mount
command from your host. wihout any options it returns all mounted partitions, so you look for something like:
/dev/sda9 on /mnt/lfs type ext4 (rw,relatime,data=ordered)
in my case it is device /dev/sda9
and type is ext4
, and that's what i put in my fstab for <xxx>
and <fff>
.
swap partition described by:
/dev/<yyy> swap swap pri=1 0 0
was probably already on your ubuntu host, so you didn't set it up in chapter 2. but we can again look it up in already mounted partitions.
command mount | grep swap
will show you only mounted swap partitions. and again, you take device name and substitute <yyy>
for it :)
rest of the fstab file you leave as it is in the example, should work without any more changes.
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
as per lfs book description:
Replace
<xxx>
,<yyy>
, and<fff>
with the values appropriate for the
system, for example, sda2, sda5, and ext4.
your root partition described by:
/dev/<xxx> / <fff> defaults 1 1
is the same partition you set up in chapter "2.4. Creating a New Partition", and later mounted as your $LFS
(by default /mnt/lfs
). and as per book description it's something like /dev/sda5
.
type of root partition (<fff>
in fstab example) was set by you in chapter "2.5. Creating a File System on the Partition". by default it is ext4
.
if unsure, you can use mount
command from your host. wihout any options it returns all mounted partitions, so you look for something like:
/dev/sda9 on /mnt/lfs type ext4 (rw,relatime,data=ordered)
in my case it is device /dev/sda9
and type is ext4
, and that's what i put in my fstab for <xxx>
and <fff>
.
swap partition described by:
/dev/<yyy> swap swap pri=1 0 0
was probably already on your ubuntu host, so you didn't set it up in chapter 2. but we can again look it up in already mounted partitions.
command mount | grep swap
will show you only mounted swap partitions. and again, you take device name and substitute <yyy>
for it :)
rest of the fstab file you leave as it is in the example, should work without any more changes.
as per lfs book description:
Replace
<xxx>
,<yyy>
, and<fff>
with the values appropriate for the
system, for example, sda2, sda5, and ext4.
your root partition described by:
/dev/<xxx> / <fff> defaults 1 1
is the same partition you set up in chapter "2.4. Creating a New Partition", and later mounted as your $LFS
(by default /mnt/lfs
). and as per book description it's something like /dev/sda5
.
type of root partition (<fff>
in fstab example) was set by you in chapter "2.5. Creating a File System on the Partition". by default it is ext4
.
if unsure, you can use mount
command from your host. wihout any options it returns all mounted partitions, so you look for something like:
/dev/sda9 on /mnt/lfs type ext4 (rw,relatime,data=ordered)
in my case it is device /dev/sda9
and type is ext4
, and that's what i put in my fstab for <xxx>
and <fff>
.
swap partition described by:
/dev/<yyy> swap swap pri=1 0 0
was probably already on your ubuntu host, so you didn't set it up in chapter 2. but we can again look it up in already mounted partitions.
command mount | grep swap
will show you only mounted swap partitions. and again, you take device name and substitute <yyy>
for it :)
rest of the fstab file you leave as it is in the example, should work without any more changes.
edited Oct 2 '17 at 2:12
answered Oct 2 '17 at 2:03
rsm
1589
1589
add a comment |Â
add a comment |Â
up vote
-1
down vote
I am not familiar with LFS. But, the "mount" command does a good job of guessing what file system is on the partition. Create a mount point for the partition, mount it, then run the mount command again.
# mkdir -p /mnt/hd
# mount /dev/sdb1 /mnt/hd
# mount
The output of the last command should look something like this:
/dev/sda6 swap swap defaults 0 0
/dev/sda8 / ext4 defaults 1 1
/dev/sda5 /mnt/old ext4 defaults 1 2
/dev/sda7 /usr/src/ ext4 defaults 1 2
/dev/sda9 /var/log ext4 defaults 1 2
/dev/sdb1 /home ext4 defaults 1 2
add a comment |Â
up vote
-1
down vote
I am not familiar with LFS. But, the "mount" command does a good job of guessing what file system is on the partition. Create a mount point for the partition, mount it, then run the mount command again.
# mkdir -p /mnt/hd
# mount /dev/sdb1 /mnt/hd
# mount
The output of the last command should look something like this:
/dev/sda6 swap swap defaults 0 0
/dev/sda8 / ext4 defaults 1 1
/dev/sda5 /mnt/old ext4 defaults 1 2
/dev/sda7 /usr/src/ ext4 defaults 1 2
/dev/sda9 /var/log ext4 defaults 1 2
/dev/sdb1 /home ext4 defaults 1 2
add a comment |Â
up vote
-1
down vote
up vote
-1
down vote
I am not familiar with LFS. But, the "mount" command does a good job of guessing what file system is on the partition. Create a mount point for the partition, mount it, then run the mount command again.
# mkdir -p /mnt/hd
# mount /dev/sdb1 /mnt/hd
# mount
The output of the last command should look something like this:
/dev/sda6 swap swap defaults 0 0
/dev/sda8 / ext4 defaults 1 1
/dev/sda5 /mnt/old ext4 defaults 1 2
/dev/sda7 /usr/src/ ext4 defaults 1 2
/dev/sda9 /var/log ext4 defaults 1 2
/dev/sdb1 /home ext4 defaults 1 2
I am not familiar with LFS. But, the "mount" command does a good job of guessing what file system is on the partition. Create a mount point for the partition, mount it, then run the mount command again.
# mkdir -p /mnt/hd
# mount /dev/sdb1 /mnt/hd
# mount
The output of the last command should look something like this:
/dev/sda6 swap swap defaults 0 0
/dev/sda8 / ext4 defaults 1 1
/dev/sda5 /mnt/old ext4 defaults 1 2
/dev/sda7 /usr/src/ ext4 defaults 1 2
/dev/sda9 /var/log ext4 defaults 1 2
/dev/sdb1 /home ext4 defaults 1 2
answered Oct 1 '17 at 22:01
Garnet
1
1
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395512%2fhow-do-i-create-a-proper-etc-fstab-file-for-my-lfs-partition%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
blkid
is your friend! Also if you used archlinux, genfstab works in LFS (it's a simple bash script to generate a fstab).â cylgalad
Oct 2 '17 at 8:37