Automatic mount ext4 hard disk on boot problem
12,410
Solution 1
according to this thread, when mounting an ext4 partition via fstab, you cannot use uid=1000,gid=1000
, but permissions should be set in the partition's root directory
Solution 2
Just look at the dmesg
output
EXT4-fs (sdb5): Unrecognized mount option "uid=1000" or missing value
good starting options are defaults
If you want to tune the drive then you could also add barrier=0
Related videos on Youtube
Author by
Bryan
Updated on September 18, 2022Comments
-
Bryan over 1 year
I used blkid and its output:
/dev/sda1: UUID="54221CEE221CD6B8" TYPE="ntfs" /dev/sda2: LABEL="Data" UUID="FE10555E10551EC9" TYPE="ntfs" /dev/sda5: UUID="fc63b7f3-9b03-4e85-a0ce-fa638eeff40b" TYPE="ext4" /dev/sda6: UUID="f498cfb8-519f-462d-ae26-2fabb709ad8b" TYPE="swap" /dev/sdb5: LABEL="backup" UUID="e8572aae-27e7-4d16-84fa-81c437529373" TYPE="ext4"
I want to mount sdb5 automatically so I edited the fstab like this
UUID=fc63b7f3-9b03-4e85-a0ce-fa638eeff40b / ext4 errors=remount-ro 0 1 UUID=f498cfb8-519f-462d-ae26-2fabb709ad8b none swap sw 0 0 UUID=e8572aae-27e7-4d16-84fa-81c437529373 /media/dongchirua/ ext4 uid=1000,gid=1000,umask=0022,sync,auto,rw 0 0
(/media/dongchirua/ is place where I want to mount to)
but when system start, a message shows an error on sdb5 and press S to skip it? Could you please help?
-
Jacob Vlijm about 10 yearsHi user 63730, I think you will make it more readable if you place code (and the content of the fstab file), starting each line with 4 spaces, then it will automatically will displayed in the correct layout.
-
Jacob Vlijm about 10 yearsHi again user63730, according to this thread askubuntu.com/questions/432120, you managed, is that correct?
-
Bryan about 10 yearsyes, it's my another question, but when I mount after login by using GUI, it is ok. I want to mount automatically at boot
-