Prevent pacman from overwriting /boot directory [SOLVED]

This forum is for topics dealing with problems with software specifically in the ARMv5 repo.

Prevent pacman from overwriting /boot directory [SOLVED]

Postby pentolino » Wed Dec 21, 2016 2:30 pm

I have a dockstar with a working archlinux arm installation; I used the two partition approach: one (ext2) for /boot and one (ext4) for /. I have the boot partition mounted as /boot2 in my system and a symlink /boot2/boot -> /boot instead of the usual /boot directory.

Everything works fine until I upgrade the kernel through pacman; it does two things that cripple my system if I don't fix it before reboot:
1. it deletes uimage from /boot2/boot (thus rendering the system unbootable)
2. it replaces my /boot symlink with a new directory containing both boot files.

I can fix this after the fact by simply recreating the right structure, but this would completely defy the purpose why I have dobe that.

Is there any way to prevent pacman from doing such a mess, other than blocking updates on the kernel?

Thanks,
Riccardo
Last edited by pentolino on Thu Dec 22, 2016 8:39 am, edited 1 time in total.
pentolino
 
Posts: 16
Joined: Sun Feb 27, 2011 10:31 am

Re: Prevent pacman from overwriting /boot directory

Postby moonman » Wed Dec 21, 2016 5:56 pm

use mount -o bind instead of symlinks
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3089
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada

Re: Prevent pacman from overwriting /boot directory

Postby pentolino » Thu Dec 22, 2016 8:39 am

Thanks a lot, I didn't know that!
I will definitely try, it seems a much better option :-)

EDIT: it worked, in my case the line to add to fstab is (I leave it here, as it may be useful to others):

# bind mount for /boot
/boot2/boot /boot none defaults,bind 0 0
pentolino
 
Posts: 16
Joined: Sun Feb 27, 2011 10:31 am

Re: Prevent pacman from overwriting /boot directory [SOLVED]

Postby moonman » Thu Dec 22, 2016 9:28 pm

Also, you don't need to use a separate ext2 partition for /boot as uboot-dockstar supports ext4. It also supports booting linux-kirkwood-dt which will eventually be the main kernel for kirkwood
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3089
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada


Return to ARMv5

Who is online

Users browsing this forum: No registered users and 2 guests