You are not logged in.
Last night / this morning I copied the root and swap partitions of an Arch Linux installation (stushiba) I had on an old Toshiba hard drive, as well as the "system reserved" and other partitions of a Windows 8 install (stuzate) on another 500GB hard drive, onto a new 2TB Western Digital hard drive using Gparted via an external Arch environment I run off of a microSD card + adapter (sturling).
After doing so, I installed GRUB to the new drive to the best of my ability, but when I try to boot the system with just that drive, this is what I see:
GRUB loading.
Welcome to GRUB!
error: unknown filesystem.
Entering rescue mode...
grub rescue>
Running ls doesn't find anything:
grub rescue> ls
(hd0) (hd0,msdos4) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)
grub rescue> ls (hd0,msdos4)
(hd0,msdos4): Filesystem is unknown.
grub rescue> ls (hd0,msdos3)
(hd0,msdos3): Filesystem is unknown.
grub rescue> ls (hd0,msdos2)
(hd0,msdos2): Filesystem is unknown.
grub rescue> ls (hd0,msdos1)
(hd0,msdos1): Filesystem is unknown.
The system should be on (hd0,msdos3) - it's ext4, and, if I insert the old Toshiba hard disk to the system and select that as my boot device in BIOS, it boots from the partition on the old drive's grub menu, into the partition in the new drive (because they have the same UUID), so the partition's definitely readable/bootable. (I've tried both regenerating the grub menu and installing grub from this boot scenario, with no change.)
(That said, if I enter a console on my system with a working GRUB installation and do an ls on that partition, I get more "unrecognized filesystem" messages.)
Once the new partition had loaded, I ran
sudo grub-mkconfig -o /boot/grub/grub.cfg
and rebooted, but GRUB was still broken.
I tried fixing this by rebooting into the latest installation media, with only the new hard drive plugged in, and running
mount /dev/sda3 /mnt
arch-chroot /mnt
modprobe dm-mod
grub-install --recheck /dev/sda
But that still hasn't fixed anything: I still get the "error: unknown filesystem." message whenever I try to do anything in GRUB.
My /boot/grub/grub.cfg: http://sprunge.us/RMeD
Help!
Last edited by STUART (2013-09-12 01:55:16)
Offline
Please post the output of lsblk -f and of fdisk -l /dev/sdX where X is the appropriate drive letter e.g. /dev/sda if that is the new disk.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
This is the output when running from sturling (neither partition booted).
/dev/sda is the new disk, /dev/sdb is the microSD card I'm running the system off of, and /dev/sdc is the old disk.
[stuart@sturling ~]$ sudo lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ntfs System Reserved F24C78CE4C788EDB
├─sda2 ntfs F68C7D338C7CF00B
├─sda3 ext4 stushiba 1c8533ed-4a3c-4a4c-907b-682bd2313492
└─sda4 swap 97c30b3e-f763-437b-aa71-0378bef4c017
sdb
├─sdb1 vfat savfat A13A-D130 /vfat
└─sdb2 ext4 saroot 7434b70f-7028-4a8d-ad78-a4975a98e1a6 /
sdc
├─sdc1 ext4 stushiba 1c8533ed-4a3c-4a4c-907b-682bd2313492
└─sdc2 swap 97c30b3e-f763-437b-aa71-0378bef4c017
sr0
[stuart@sturling ~]$ sudo fdisk -l /dev/sda
Disk /dev/sda: 2000.4 GB, 2000365289472 bytes, 3906963456 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0005f107
Device Boot Start End Blocks Id System
/dev/sda1 2048 718847 358400 7 HPFS/NTFS/exFAT
/dev/sda2 718848 1937063935 968172544 7 HPFS/NTFS/exFAT
/dev/sda3 1937063936 3873409023 968172544 83 Linux
/dev/sda4 3873409024 3906963455 16777216 82 Linux swap / Solaris
[stuart@sturling ~]$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 31.9 GB, 31914983424 bytes, 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000c314b
Device Boot Start End Blocks Id System
/dev/sdb1 2048 8390655 4194304 c W95 FAT32 (LBA)
/dev/sdb2 * 8390656 62333951 26971648 83 Linux
[stuart@sturling ~]$ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 100.0 GB, 100030242816 bytes, 195371568 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x8bef8bef
Device Boot Start End Blocks Id System
/dev/sdc1 2048 178593791 89295872 83 Linux
/dev/sdc2 178593792 195371007 8388608 82 Linux swap / Solaris
Offline
Did you modprobe dm-mod before arch-chrooting to install grub to disk? I notice the instructions in the wiki include this but you don't mention it.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I modprobed dm-mod after chrooting.
Offline
That will only work if the kernel on the live media you used matches the installed kernel. Did it? If you modprobe before chrooting, it doesn't need to match - that's why the wiki specifies the order it does.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Where does the wiki specify that order? https://wiki.archlinux.org/index.php/GRUB only specifies to do the modprobe first, then the grub-install. It doesn't actually mention chrooting at all.
Also, if there were a kernel issue, wouldn't I be seeing some kind of error?
Also, if this were the issue, wouldn't doing the grub-install from inside the booted environment (which I have done) have fixed it?
Last edited by STUART (2013-09-12 00:23:50)
Offline
Where does the wiki specify that order? https://wiki.archlinux.org/index.php/GRUB only specifies to do the modprobe first, then the grub-install. It doesn't actually mention chrooting at all.
I thought it would say it in the installation guide (where the chroot is relevant) but it only seems to say this in the case of EFI booting (where modprobe efivars must be done prior to arch-chroot).
Also, if there were a kernel issue, wouldn't I be seeing some kind of error?
modprobe won't give an error - it will just silently fail. Not sure about grub-install.
Also, if this were the issue, wouldn't doing the grub-install from inside the booted environment (which I have done) have fixed it?
Yes, it should.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Reading around, apparently the base GRUB searcher has issues finding ext* partitions after a large NTFS partition. Re-installing with this command set up the system so it could boot itself:
sudo grub-install --recheck --disk-module=native /dev/sda
However, this still presented some issues:
Several failed attempts at finding the partition with all the incorrect modules had to come before the correct module could find it.
When the menu was finally presented, it seems my keyboard didn't work.
The menu wasn't at my native resolution (of course, I'm not sure it ever was.)
I'm working on alternate formulations of the install that will make it work now.
Offline
For stuff like resolution, see /etc/default/grub (and the wiki which explains the options there).
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline