You are not logged in.

#1 2010-04-16 15:13:45

ice9
Member
Registered: 2010-04-16
Posts: 14

Disk order changes, grub problem, filesystem check failed

I'm having some problems installing Archlinux onto a machine with a lot of SATA drives, some connected by SATA cards. I have tried the 2009-08 netinstaller burned to CD, both -x86_64.iso and -x86_64-isolinux.iso, and I have the same problem with both.

I am installing from a USB-connect optical drive to an Intel X25-M 80GB SSD connected to a motherboard SATA port. I also have 2 HDDs connected to motherboard SATA ports, and 4 more HDDs connected to 4 SIL-based PCIe SATA cards. Additionally, I have a 4GB Patriot USB flash drive connected to a motherboard USB port. None of the HDDs have a bootable MBR, I am planning to create an mdadm RAID with the HDDs, but the USB flash drive is bootable. The motherboard is an Asus Z8PE-D18 with the latest BIOS, in AHCI mode.

First thing to note is that I was able to successfully install Fedora 12 linux to this machine in the exact configuration that I am trying to install Archlinux. I just installed Fedora 12 again last night, and it installed and loaded fine when I rebooted from the SSD.

So, the problems I am having with Archlinux. During install, I found that the SSD is showing up as either /dev/sde or /dev/sdf. This is odd since it was /dev/sda with Fedora. It makes sense for it to be /dev/sda, since it is on the first motherboard SATA port. But I proceeded with the Archlinux install, and grub seemed to detect the stage1 location properly -- root was set to (hda4,0) or (hda5,0) depending on whether the SSD was at sde or sdf. The kernel root was configured by UUID, so that does not depend on the drive order. Okay so far.

The problem shows up on reboot. The bootloader immediately complains that there is no such partition sde1 or sdf1. I drop into a grub command line and do

find /boot/grub/stage1

and it replies with (hd0,0), so I modify the boot line to root (hd0,0) and boot. Now it gets pretty far. Lots of boot messages scroll by. Here are some of the last few before the problem:

Waiting 10 seconds for device /dev/disk/by-uuid/22a35aa2-9799-4575-b1eb-456e819a1a26 ...
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sde1): mounted filesystem with writeback data mode
INIT: version 2.86 booting
....
::Starting UDev DAemon
::Triggering UDev uevents
::Loading Modules
::Waiting for UDev uevents to be processed
::Bringing up loopback interface
::Mounting Root Read-only
::Checking Filesystems
/dev/sdf1:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock

**** FILESYSTEM CHECK FAILED
* Please repair manually and reboot. Note that the root file system
* is currently mounted read-only....

Give root password for maintenance

So I logged in as root and did an fdisk -l. The boot SSD was at /dev/sde. The menu.lst has root as (hd5,0), which would be sdf (which was correct during installation, but the disk order apparently changed). The kernel root= in menu.lst used by-uuid, and it at least points to the correct drive, which I suppose is why I was able to boot as far as I did, but when it tries to mount the root filesystem, it fails as shown above.

So, at initial grub boot, the grub stage1 is found at (hd0,0). During installation, the SSD was sdf, but after booting the kernel, the SSD is sde. What is going on?

One other experiment  is that I pulled all the drives (including USB flash drive) except the SSD. The HDDs are in hot-swap slots, so that was easy. The PCIe SATA cards are still plugged into the PCIe slots. Then I was able to successfully install and boot Archlinux. But when I plugged the drives back in and rebooted, I had the same problem as detailed above.

Any suggestions on how to fix this?

Offline

#2 2010-04-16 23:17:42

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Disk order changes, grub problem, filesystem check failed

You will need to switch to using labels or UUIDs to refer to the devices as these are guaranteed not to change.  http://wiki.archlinux.org/index.php/Per … ice_naming

Offline

#3 2010-04-16 23:30:46

ice9
Member
Registered: 2010-04-16
Posts: 14

Re: Disk order changes, grub problem, filesystem check failed

I don't think grub will accept anything but (hdx,y) format on the root line. Note, I am not talking about the kernel root= line, but the root (hdx,y) line.

Offline

#4 2010-04-16 23:34:31

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: Disk order changes, grub problem, filesystem check failed

No, but (hd0,0) seems to work alright, no? I think he meant /etc/fstab

Offline

#5 2010-04-16 23:34:58

smilingfrog
Member
Registered: 2010-04-13
Posts: 3

Re: Disk order changes, grub problem, filesystem check failed

I had the same problem.
Last week I installed Arch onto a new SATA HD. I wanted to make sure the installation worked before I attached the other drives. On booting with the other drives attached, similar messages.

My solution:
Login as root.
Follow the instruction to mount / as read-write so you can make changes to the filesystem.
edit /etc/fstab and eliminate the references to /dev/sdxx and replace them with UUIDs or labels (as suggested above) as these won't change.

in /etc/fstab ...
# external data sources
#data  /dev/sdb6
UUID=931d7107-1241-4d82-ad28-fcbe7af8ba69 /data ext3 defaults 0 0

#Documents  /dev/sda9
/dev/disk/by-label/Documents    /data/Documents  ext3 defaults   0 0

Reboot and you should be good.

You can find the UUID of the drives by using

$ blkid

or you can set a drive label with e2label, assuming you are using ext2,3 or 4

Good luck.

Offline

#6 2010-04-16 23:50:03

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Disk order changes, grub problem, filesystem check failed

ice9 wrote:

I don't think grub will accept anything but (hdx,y) format on the root line. Note, I am not talking about the kernel root= line, but the root (hdx,y) line.

This is true of grub 0.9x.  Grub2 supports the search command, which may be useful if the grub root device also changes.

Offline

#7 2010-04-17 13:37:24

ice9
Member
Registered: 2010-04-16
Posts: 14

Re: Disk order changes, grub problem, filesystem check failed

Thanks for the grub2 tip. I gave my boot SSD partition/filesystem the label 'osboot' and then made sure every reference (grub2 root, kernel root, fstab) used the label. Now I can boot with no problems.

I had a bit of difficulty finding documentation on exactly how to boot with grub2 using nothing but labels, so in case it is useful to anyone, here is the /boot/grub/grub.cfg menuentry I used:

menuentry "Arch Linux Default" {
  set gfxpayload=keep
  search --label osboot --set root
  linux /boot/vmlinuz26 root=/dev/disk/by-label/osboot ro
  initrd /boot/kernel26.img
}

By the way, to keep things simple the SSD only has 1 partition with mountpoint / , and I used ext3 filesystem. If you have a separate /boot partition, I think you will need to omit the /boot in the filenames above.

Offline

Board footer

Powered by FluxBB