Steps to change partition including Linux system area and boot area

What to prepare

GParted Live etc.

Since the partition including the system area of the OS cannot be changed while the OS is booting, another OS must be booted and the partition must be changed from the outside. Therefore, we use a mechanism to boot the OS directly from an external storage such as LiveCD or LiveUSB. There are many LiveCDs that include partitioning software (sometimes included in the OS installation image), but some have only GParted installed. https://gparted.org/liveusb.php If you follow the procedure at the URL, you can create a USB that can boot the OS.

procedure

If you turn on the power of the PC with the created OS boot USB inserted, the OS will boot without mounting the HDD or SSD. Change the partition using GParted etc.

In GParted, if you change the partition that contains the boot area, you will get a warning that the OS will not boot.

This is because the OS boot image is registered in the boot loader, but the location of the image changes.

This will be fixed after changing the partition.

After confirming and executing the partition change, close GParted and open Terminal.

Repair the boot loader (GRUB) according to the following page. https://gparted.org/display-doc.php?name=help-manual&lang=C#gparted-fix-grub-boot-problem

For EFI boot with GRUB2, the command in step 5 changes the mount destination as follows.

# mount /dev/sdaX /tmp/mydir/boot/efi

After repairing GRUB, disconnect the OS boot LiveUSB after shutdown and turn on the PC.

Recommended Posts

Steps to change partition including Linux system area and boot area
Arch Linux install to BIOS boot system
I tried adding system calls and scheduler to Linux
Device and Linux file system
I summarized how to change the boot parameters of GRUB and GRUB2
A memorandum to change to Manjaro Linux
Permission and ownership change command [Linux]
Device, Linux file system, FHS ① Memorandum Creation of partition and file system / maintenance of file system integrity
Build Linux on a Windows environment. Steps to install Laradock and migrate
[Linux] How to subdivide files and folders
Introducing Japanese input system to Serene Linux
[Linux partition] How to shrink home to move sectors and then increase root size