How can I painlessly enlarge my sda1 boot partition ?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How can I painlessly enlarge my sda1 boot partition ?
Hi folks,
I have a cryptsetup-lvm-encrypted HDD where SW-current resides. It has 2 partitions : sda1 as /boot and sda2 as the encrypted rest of the system (root, home).
Now I see that sda1 (50MB) is too small to handle the necessary kernel upgrades.
How can I enlage it to 100MB or so without reinstalling all partitions from scratch ?
Distribution: openSUSE(Leap and Tumbleweed) and a (not so) regularly changing third and fourth
Posts: 627
Rep:
You can't. You could try shrinking sda2 enough to create sda3 for boot if you still have space on sda2.
That would leave you with an empty 50mb on sda1.
Back in the day I used Partition Magic to do just what you want to do. I had a look at gparted and see that it can resize unmounted partitions sooooo I would prepare a Slackware Live dvd and use it to run gparted on your (now unmounted) hard drive and resize
Distribution: openSUSE(Leap and Tumbleweed) and a (not so) regularly changing third and fourth
Posts: 627
Rep:
You can resize a partition and make it smaller and if there is space after a partiton you can extend it. You can't do exactly what you require without formatting your sda2 and extending into the space.
I'm not a Slackware user, but if it works like other linux distributions I'm familiar with...
The most painless solution would be to create a new /boot partition on a USB thumbdrive and reconfigure/reinstall grub (or whatever boot loader you're using).
I don't know the Slackware way of doing this. I know how to do it with Debian, but I expect it may be significantly different in Slackware.
I think you're all missing the point that sda2 is encrypted lvm, and therefore simply resizing sda2 will destroy the logical volumes inside it.
I think brodo needs to boot from USB or DVD or PXE, then unlock sda2, then resize each LVM filesystem, then resize each LVM logical volume, then resize the LVM physical volume, then resize the LUKS volume, then resize (and move) the sda2 partition, then resize the sda1 boot partition. Something like this: https://wiki.archlinux.org/index.php...ng_LVM-on-LUKS
It will not be painless and you will need good backups
I didn't miss that point, FWIW. That's why I suggest migrating /boot to a USB thumbdrive. It's the most painless solution because it doesn't require modifying any partitioning or LVM volumes on sda.
I attempted similar a while back - not Slack, but that shouldn't matter in the grand scheme of things.
Resizing is relatively straight-forward, but you have to be careful - resize filesystem, lv,pv, crypt container. Then do the partition and get all the offsets correct.
Of course that puts the free space at the wrong end. No problem, Use that as /boot instead - if your BIOS allows that; these days shouldn't be a problem. I was on a UEFI system so moved the EFI partition to the free space. Was never able to get grub to boot completely - maybe I got the initramfs hooks wrong.
Gave up, zapped the entire disk, and treated it as a lesson learned.
YMMV.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.