editing /etc/fstab
I want to play with lfs. I have a ext4 partition that is empty. I don't want to change fstab until I know exactly what to do. As I've mentioned before I'm just getting back to linux and don't remember how. I know lfs is ambitious but I;d like to jump in and get my feet wet. I've succeeded once before.
# <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda1 during installation UUID=f3a3b058-e5a4-49fb-8a04-f7c190e7bec8 / ext4 defaults 0 1 # /home was on /dev/sda3 during installation UUID=8b050d2d-ddf2-498e-b5a4-be7bc616b1d1 /home ext4 defaults 0 2 # swap was on /dev/sda4 during installation UUID=54ee6d31-6f6e-413d-b4e5-ab82c322d522 none swap sw 0 0 /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 |
You'll need to make a mount point for the partition with command: sudo mkdir /mnt/lfs (I used lfs as a name, change to what you like, the /mnt directory is a good place for mounting partitions.
Run the command sudo fdisk -l to figure out the device name of the partition, then run command: sudo blkid to find the UUID of the partition. Using the "example" blkid command output below, you then add a line in /etc/fstab with same options, dump and pass entries as /, using the new directory created earlier as the mount point, a sample fstab line in second code below. Example blkid command output Code:
/dev/sda1: UUID="4097bf06-3fae-4f3f-b024-b4b7621ae0c9" TYPE="ext4" PTTYPE="dos" PARTUUID="eb49b0ef-01" Code:
UUID=4097bf06-3fae-4f3f-b024-b4b7621ae0c9 /mnt/lfs ext4 defaults 0 1 |
You don't have to use UUIDs in fstab just because the existing entries use them. Traditional device names like /dev/sda2 are quite acceptable.
A tip for editing system config files: first create a backup with a ".orig" suffix. Code:
sudo cp /etc/fstab /etc/fstab.orig |
Quote:
|
|
This is what I got
UUID=PARTUUID=e55dc00204 /mnt/lfs ext4 defaults 0 1 lfs says it can't find sda2 |
basic rule of thumb that goes across the platform
Code:
source -> detestation |
I' sorry. I don't understand. I'm so rusty.
|
Quote:
Code:
cp -p /etc/fstab{,.$(date +%H%M-%Y%b%d)} |
I did my backup. I edited fstab as follows:
/dev/sda2 /mnt/lfs ext4 defaults 0 1 I'm getting wrong fs type, bad option/ bad superblock, on /dev/sda2 |
Quote:
what is on that partition / directory Code:
blkid I'd use gparted to check it for bad blocks create partition table if needed, their are command line options I am sure others know. |
I contacted the company after I received my computer and they said all the partitions are ext4
|
Quote:
EDIT: And if it still complains after you get the right information in place, hit the Tab key instead of the space key after each section. |
Just on small ssd laptop right now. my desktop machines have a more elaborate fstab made by me.
Code:
harry@harry-Latitude-XT2:~$ cat /etc/fstab |
I fixed that.
thanks for the help. The problem I'm having is that when I try to mount lfs using the instructions it still says it can't find /dev/sda2 And there is no long number. I'm using what the output is. |
All times are GMT -5. The time now is 05:50 PM. |