Mounting partition on boot

Archived topics about LMDE 1 and LMDE 2
Locked
fiik1

Mounting partition on boot

Post by fiik1 »

I know that this has been covered over an over in many forums, but mine has an extra challenge.

Simply put, the partition will mount from the desktop when password is supplied. When I edited the fstab to mount on boot the startup process fails - with failure to read DMA and logical blocks.

I start with

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb1
UUID=f89ed5f7-2c5c-43e5-91c7-cfeb4d2dbf80 / ext4 rw,errors=remount-ro 0 1
# /dev/sda6
UUID=727238b7-2062-4f60-b5ff-16fe99b485a5 /home ext4 rw,errors=remount-ro 0 1
# /dev/sdb3
UUID=1b146516-588f-443c-9c41-3df04e5f3ddf swap swap sw 0 0
# /dev/sdb2
UUID=beec6f37-80d1-468f-8005-d201cb4bc899 /home/fiik/backupA ext4 rw,errors=remount-ro 0 1


I have already managed to change things around to allow home on sda6 and a data partition on sdb2. I can access backupA thru my home folder.

I am trying to add a data partition on sda5. I mkdir Home. and edit fstab to give

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb1
UUID=f89ed5f7-2c5c-43e5-91c7-cfeb4d2dbf80 / ext4 rw,errors=remount-ro 0 1
# /dev/sda6
UUID=727238b7-2062-4f60-b5ff-16fe99b485a5 /home ext4 rw,errors=remount-ro 0 1
# /dev/sdb3
UUID=1b146516-588f-443c-9c41-3df04e5f3ddf swap swap sw 0 0
# /dev/sdb2
UUID=beec6f37-80d1-468f-8005-d201cb4bc899 /home/fiik/backupA ext4 rw,errors=remount-ro 0 1
# /dev/sda5
UUID=81a9d2ba-96a3-4c5e-ba92-2d1198261936 /home/fiik/Home ext4 rw,errors=remount-ro 0 1

When I restart with this setup, the script shows the system trying to mount sda5 finding errors and repeatedly failing to read DMA and reporting logic blocks until it gives up.

Hit CTRL D to login.

Going through the rescue mode is beyond me still, so I use the LiveDVD to boot up and edit fstab back to the one that works.

I've thought of putting up with the way it is - works but messy. It would be nice to have it 'elegant'.

Thanks in advance,

Bruce
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rekik

Re: Mounting partition on boot

Post by rekik »

May be a UUID mess ? I would have tried to replace UUID=************ by /dev/sda* (after a back-up of fstab of course)
fiik1

Re: Mounting partition on boot

Post by fiik1 »

Thanks mate,

I tried -

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb1
UUID=f89ed5f7-2c5c-43e5-91c7-cfeb4d2dbf80 / ext4 rw,errors=remount-ro 0 1
# /dev/sda6
UUID=727238b7-2062-4f60-b5ff-16fe99b485a5 /home ext4 rw,errors=remount-ro 0 1
# /dev/sdb3
UUID=1b146516-588f-443c-9c41-3df04e5f3ddf swap swap sw 0 0
# /dev/sdb2
UUID=beec6f37-80d1-468f-8005-d201cb4bc899 /home/fiik/backupA ext4 rw,errors=remount-ro 0 1
# /dev/sda6
/dev/sda6 /home/fiik/Home ext4 rw,errors=remount-ro 0 1

The partition didn't mount - directory Home had no items.

I could still mount the partition with password.
fiik1

Re: Mounting partition on boot

Post by fiik1 »

Woops - typo on last fstab edit.

I changed the last two lines to -

# /dev/sda5
/dev/sda5 /home/fiik/Home ext4 rw,errors=remount-ro 0 1

I watched the bootup closer so and noted /var/log/fsck/checkfs

Log of fsck -C -R -A -a
Fri Nov 4 01:41:52 2011

fsck from util-linux-ng 2.17.2
/dev/sda6: clean, 11630/2101232 files, 1023392/8402432 blocks
BackUp: clean, 1317/1671168 files, 471627/6673408 blocks
Home contains a file system with errors, check forced.
Error reading block 11534368 (Attempt to read block from filesystem resulted in short read) while getting next inode from scan.

Home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck died with exit status 4

Fri Nov 4 01:43:05 2011
----------------

Looks like I need to fix block 11534368

I'll research this and post another thread if it beats me
fiik1

Re: Mounting partition on boot

Post by fiik1 »

Further to above -

Spent hours backing up data with a 16 GB flash drive and then ran GParted check.

Took all of 90 seconds. Edited fstab and rebooted. Home successfully mounted.

Fully solved and learnt some.
Locked

Return to “LMDE Archive”