You are not logged in.

#1 2014-08-17 18:22:48

tlawren
Member
From: Colorado, US
Registered: 2009-04-06
Posts: 80

how to fix Grub after moving arch to new drive [SOLVED]

I moved my Arch install (/ and /home partitions) to a new drive and I was wondering how to fix Grub so that it knows /boot is on the new drive.  What I've done thus far is
create partitions on the new drive and dd my current / and /home partitions to them.  The new partitions are bigger than the current ones, so I also re-sized the filesystems to fill the new partitions.  My disk/partition setup is the following

/dev/sda1        2048 488392703 488390656 232.9G  7 HPFS/NTFS/exFAT   (Storage)

/dev/sdb1  *         2048    206847    204800  100M  7 HPFS/NTFS/exFAT   (System reserved)
/dev/sdb2          206848 102402047 102195200 48.7G  7 HPFS/NTFS/exFAT   (Windows 7)
/dev/sdb3  *    102402048 141472127  39070080 18.6G 83 Linux   (Current Arch /)
/dev/sdb4       141472128 250069679 108597552 51.8G 83 Linux   (Current Arch /home)

/dev/sdc2  *       206848 105064447 104857600   50G 83 Linux   (New Arch /)
/dev/sdc3       105064448 234441647 129377200 61.7G 83 Linux   (New Arch /home)

After I resized the filesystems, I then created a new grub.cfg file (on /dev/sdb3) that is aware of the new Arch system.  I can boot to both my current and new Arch installs and run them fine, but ultimately I want to remove the current Arch install so I can make more room for my Windows 7 install.  What do I need to do to grub, so it knows to use the new Arch system.

Last edited by tlawren (2014-08-17 21:42:46)

Offline

#2 2014-08-17 18:38:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: how to fix Grub after moving arch to new drive [SOLVED]

Where is your boot partition, or is it just /boot on /dev/sdb3?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-08-17 18:41:22

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: how to fix Grub after moving arch to new drive [SOLVED]

You need to install the Master Boot Record (MBR) on /dev/sdc, configure grub in /boot on /dev/sdc2, then configure your hardware to boot /dev/sdc2 directly (e.g. via BIOS). You will likely want to add entries for your Windows installation to grub on /dev/sdc2 (or a chainloader for booting /dev/sdb).

Basically just boot into the new Arch install and then re-install and reconfigure grub on that disk. Add a chainloader to the old grub to test the new installation. If that works, configure your system to boot it directly.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2014-08-17 19:58:16

tlawren
Member
From: Colorado, US
Registered: 2009-04-06
Posts: 80

Re: how to fix Grub after moving arch to new drive [SOLVED]

@ewaller - I don't have a separate boot partition, so /boot is on /dev/sdb3.  I is there a way to switch the new /boot on /dev/sdc1 with the current /boot on /dev/sdb3?

Offline

#5 2014-08-17 21:40:38

tlawren
Member
From: Colorado, US
Registered: 2009-04-06
Posts: 80

Re: how to fix Grub after moving arch to new drive [SOLVED]

@Xyne - Thanks!  Installing grub on my /dev/sdc did the trick.  Because I dd'ed my old setup to a new drive, /boot/grub was already populated, so all I had to do was install and configure grub on the new drive via the following. 

grub-install --target=i386-pc --recheck --debug /dev/sdx
grub-mkconfig -o /boot/grub/grub.cfg

I used os-prober to find the other OS's (Windows 7 and my old Arch).  After some testing, I will wipe my old Arch setup and then resize Windows into the free space.

Offline

Board footer

Powered by FluxBB