You are not logged in.
I'm booting from an USB drive, which I want to be able to take out once the system is up. This means that by default, /boot is just an empty directory. That's mostly fine, but in some cases (like if a kernel update comes in with pacman -Suy) things will get written into /boot without anything mounted there, which naturally throws things out of whack on the next boot. How do I deal with this? I don't want to plug in the drive for all updates and I don't want to have to go through the package list every time to make sure linux isn't on it. I thought about having a little script for mounting and unmounting the drive that also set permissions on /boot, but that's prone to error as I might forget to run the unmount script before shutdown or reboot and then I'm back to where I started. Is there a more robust version of this idea?
Last edited by alcedine (2014-06-29 16:34:10)
Offline
You can set IgnorePkg in /etc/pacman.conf to prevent certain packages (such as linux) from being updated.
"Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it."—Linus Torvalds
s/ftp/git/
https://iandouglasscott.com | https://github.org/ids1024 | https://keybase.io/ids1024
Offline
Yes, that'll work. Thanks.
Offline
I'd probably do something like this (warning, psuedocode ahead).
First create a wrapper function in your .bashrc (or .bash_aliases) that calls a script after pacman finishes...
pacman-boot () {
pacman $1
/path/to/checkboot.sh
}Then in the checkboot.sh script
#!/bin/sh
If /boot is empty then exit.
Else move /boot contents to temporary directory
Prompt to insert USB
Mount USB and sync from temporary directory
Unmount USBOffline