You are not logged in.

#1 2009-07-19 20:07:02

algorythm
Member
From: /usr/share/zoneinfo/Europe/FIN
Registered: 2009-07-17
Posts: 178

[Solved] Merging boot with root

Hi,

So the job is to merge my Arch's /boot partition with /root.
I have 4 primary partitions; arch /boot (sda1), ubuntu (sda2), arch / (sda3) and Vista (sda4), as you can see with fdisk:

[det@myhost Shortcuts]$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf020b972

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          24      192748+  83  Linux
/dev/sda2            5111       15386    82541970   83  Linux
/dev/sda3           15387       29332   112021245   83  Linux
/dev/sda4   *       29333       60801   252774742+   7  HPFS/NTFS

Also here's what GParted has to say:

gparted.png


Thanks for everyone smile.

Last edited by algorythm (2009-07-24 11:52:08)


PC: ASUS Maximus VIII Hero, Intel i7-6700K (4.6 GHz OC), NZXT Kraken X61, 16GB G.Skill DDR4-3200, MSI GTX 1080 Gaming X, Samsung 850 Pro 512GB, WD Black 6TB, Corsair Graphite 780T (Full Tower), be quiet! Dark Power Pro 11 650W (Platinum)
OS: Arch 64-bit / Windows 10 Pro 64-bit
Other: Dell UltraSharp 2560x1440 27", KB: Logitech G910, M: Logitech G502, HS: HyperX Cloud II, I: 100/10M

Offline

#2 2009-07-19 20:54:33

ZeroTruths
Member
Registered: 2009-07-02
Posts: 77

Re: [Solved] Merging boot with root

What I would do:
* Boot into a livedisk
* Shrink sda4
* Move sda2 into this newly freed space
* Copy the data that's in sda1 into sda3 (using a filemanager, not gparted)
* Once the data is copied, delete sda1
* Move sda3 to the front of the partition
* Remount sda3, and edit both /etc/fstab and /boot/grub/menu.lst to reflect the changes (/boot is now in sda3, not sda1)
* (Optional) Use the extra space to regrow sda4 back to its original size

Hope this helped. smile

Offline

#3 2009-07-19 20:56:45

alterecco
Member
Registered: 2009-07-13
Posts: 152

Re: [Solved] Merging boot with root

# as root, copy contents of boot to a temporary dir
mkdir /tmp/boot
cp /boot /tmp/boot -r

# umount the boot partition
umount /boot

# move (or copy) the contents back into the boot directory
mv /tmp/boot/* /boot/

# remove the line from fstab that mounts the boot partition
vim /etc/fstab     # click...clack

After this, you can freely delete the boot partition with gparted.

.]

Offline

#4 2009-07-24 11:51:04

algorythm
Member
From: /usr/share/zoneinfo/Europe/FIN
Registered: 2009-07-17
Posts: 178

Re: [Solved] Merging boot with root

Yeah thanks, but you guys didn't probably remember that moving /boot also requires reconfiguring grub (/boot/grub/menu.lst).

So what I did:

Old menu.lst

title  Arch Linux
rootnoverify   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/e289f40b-c778-4583-8bae-1f0bd769b311 ro
initrd /kernel26.img

title  Arch Linux Fallback
rootnoverify   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/e289f40b-c778-4583-8bae-1f0bd769b311 ro
initrd /kernel26-fallback.img

New menu.lst

title  Arch Linux
rootnoverify   (hd0,2)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/e289f40b-c778-4583-8bae-1f0bd769b311 ro
initrd /boot/kernel26.img

title  Arch Linux Fallback
rootnoverify   (hd0,2)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/e289f40b-c778-4583-8bae-1f0bd769b311 ro
initrd /boot/kernel26-fallback.img

Last edited by algorythm (2009-07-24 12:06:28)


PC: ASUS Maximus VIII Hero, Intel i7-6700K (4.6 GHz OC), NZXT Kraken X61, 16GB G.Skill DDR4-3200, MSI GTX 1080 Gaming X, Samsung 850 Pro 512GB, WD Black 6TB, Corsair Graphite 780T (Full Tower), be quiet! Dark Power Pro 11 650W (Platinum)
OS: Arch 64-bit / Windows 10 Pro 64-bit
Other: Dell UltraSharp 2560x1440 27", KB: Logitech G910, M: Logitech G502, HS: HyperX Cloud II, I: 100/10M

Offline

Board footer

Powered by FluxBB