You are not logged in.

#1 2012-11-30 13:37:10

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

/boot remounted automatically, can’t resize partition

Hi,

I’m trying to resize my /boot partition with gparted, so I unmount it, launch gparted and do it, but the operation always fails because /boot is automatically remounted after I click the apply button!

This smells like some systemd automount thing, but I don’t have it enabled in fstab:

/dev/sda3               /boot             ext4   noatime,discard,commit=30,errors=remount-ro        0 2

Now gparted tells me the resize is somewhat half done and I should reboot… Not very confident I am smile. If someone can explain what’s happening…

Edit: After rebooting…
- syslinux still managed to launch linux
- systemd stopped booting after finding filesystem errors on /boot
- I ran fsck on /boot and fixed the errors, then rebooted again with systemctl reboot.
- then Arch booted completely, but for some reason sound is not working.
- turns out the boot partition was moved to the beginning of the disk, but not resized, so I ran gparted again and resized it. /boot was again automatically remounted after almost every action in gparted.
- I then had to run a “Check” on /boot in gparted to finally resize the filesystem.
- And then I ran syslinux-install_update -u for good measure.

Edit2: After rebooting again…
- sound (ALSA) still off, but it turns out it’s actually working. It’s just that my Xfce mixer settings and volumes level have been reset. I really can’t see why. It was fine when I booted my PC today, before I tried to update Arch (which failed because of not enough space left on /boot.)
- looks like netcfg isn’t launching all my profiles anymore…

Edit3:
- After finally updating my system, I saw a message telling me that rc.conf wasn’t supported anymore (or almost), so I enabled several services that were in DAEMONS including netcfg. Looks like network now works again at startup.

Still no idea why /boot is mounted all the time.

Last edited by stqn (2012-11-30 18:11:41)

Offline

#2 2012-12-01 08:10:55

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: /boot remounted automatically, can’t resize partition

You have just learned a lesson the hard way.  The /boot directory contains the linux kernel, the connection between the software applications and the computer hardware.  In this case, the software was Gparted and the hardware included a partition being used.  I'm surprised you recovered from this so easily.  You were trying to move the kernel while the program needs the kernel to perform its operations.  A meager analogy might be attempting to change an automobile's transmission while driving the car.

In general, don't use Gparted on a partition mounted by the system from which it is run.  A second rule is to never attempt operations on a partition until you have a backup that you know works.

Offline

#3 2012-12-01 13:14:21

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: /boot remounted automatically, can’t resize partition

I thought the boot partition was not needed after boot… The system does work with /boot unmounted AFAIK.

Edit: I’m running Xfce, but do not have thunar-volman or any other auto-mounter installed (as far as I’m aware of).

Also, according to this page: https://www.ibm.com/developerworks/library/l-linuxboot/ , the kernel is entirely unpacked into RAM at boot, so no disk access to the kernel image should be needed afterwards.

Edit2: This Xubuntu 12.10 bug report *might* be related: Xubuntu install fail due partition auto mount defeats Gparted but there’s a crucial lack of any hint or solution there… Didn’t find anything else on the web…

Last edited by stqn (2012-12-01 14:30:53)

Offline

#4 2012-12-01 18:50:18

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: /boot remounted automatically, can’t resize partition

I would have to agree with thisoldman as what you just did seems plain old bad practice and you're lucky your system wasn't foobarred.  I've never heard of anyone unmounting /boot after their system is running--whether or not this is possible.  Always backup before resizing or changing partitions with gparted, regardless.  I've had better luck with a gparted-live cd or usb as it doesn't force a de on you.  The fact that the link you referred to was another xfce live cd maybe points to something inherent to xfce mounting practices.  That being said, it was still a live cd which is far safer than trying to resize an active partition inside a running os.  Just my 2 cents. wink


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#5 2012-12-01 19:05:32

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: /boot remounted automatically, can’t resize partition

bgc1954 wrote:

I've never heard of anyone unmounting /boot after their system is running--whether or not this is possible.

My /boot isn't even mounted until the systemd automount is triggered by pacman trying to update the kernel. Unmounting /boot at runtime is not just possible but perfectly safe, the kernel is completely loaded into RAM and you don't need to mount /boot unless you want to update the kernel, rebuild the initramfs or update your bootloader config.

Offline

#6 2012-12-01 19:42:14

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: /boot remounted automatically, can’t resize partition

@65kid - if you say so, I stand corrected.  I've never seen the need for a separate boot partition, thus my lack of knowledge.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

Board footer

Powered by FluxBB