mount: could not find filesystem '/dev/root'

715 views
Skip to first unread message

Rudi Ahlers

unread,
Nov 7, 2018, 11:55:08 AM11/7/18
to house...@googlegroups.com


Hi,

I hope someone can help me, as searching for a solution on the interwebs has not.

I cloned a CentOS 5 installation with D3 to a new 1TB HDD, to be installed into a new Dell T30 server but when I boot up I get the dreaded "mount: could not find filesystem '/dev/root' error.
I cloned the drive both through clonezilla (following these instructions: https://clonezilla.org/show-live-doc-content.php?topic=clonezilla-live/doc/03_Disk_to_disk_clone) , and using dd (dd if=/dev/sda of=/dev/sda bs=64K conv=noerror,sync)and in both cased I get the same error message.


Please advise. how do I fix this?


--
Kind Regards
Rudi Ahlers
Website: http://www.rudiahlers.co.za
IMG_20181107_161127.jpg

Rogan Dawes

unread,
Nov 7, 2018, 12:11:00 PM11/7/18
to house...@googlegroups.com
The filesystems are likely being mounted by UUID, which doesn't get cloned.

Boot with a rescue disk, run blkid, and update fstab accordingly.

--
--
You received this message because you are subscribed to the Google
Groups "house4hack" group.
To post to this group, send email to house...@googlegroups.com
To unsubscribe from this group, send email to
house4hack+...@googlegroups.com
---------------------------------------------------------------------------------------------
www.house4hack.co.za | Centurion Tue 18-21 & Sat 9-14 | Randburg Wed 18-21
---------------------------------------------------------------------------------------------
---
You received this message because you are subscribed to the Google Groups "house4hack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to house4hack+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rudi Ahlers

unread,
Nov 7, 2018, 12:23:17 PM11/7/18
to house...@googlegroups.com
fstab uses labels instead of UUID

Gert van den Berg

unread,
Nov 7, 2018, 12:35:42 PM11/7/18
to house...@googlegroups.com
The fstab on the initrd is probably the one that needs updating (but then it should boot into a rescue prompt) (if not, it might be the initrd that it can't load) 

Mark

unread,
Nov 7, 2018, 11:55:58 PM11/7/18
to house...@googlegroups.com
I don't use Centos or Redhat and I have never come across a "/dev/root" in Ubuntu/Debian, but will speculate here in the hope that it helps or provides some clue to start your investigation :) 

* Can you mount the root drive manually when booting from a live environment? I would check that first,
* Grub loads successfully and can find the kernel so that's good. It just the root drive it can't find. Although it should be ok with cloning as it should use uuids maybe the drive labels/ids have changed? I would check grub config at boot up
* Is the one server using BIOS and the new one UEFI?
* You might have to rebuild initrd due to new hardware - ie its missing the modules necessary for the new raid controller or something like that.

hth

--

Rudi Ahlers

unread,
Nov 8, 2018, 6:24:12 AM11/8/18
to house...@googlegroups.com
Gert, you kinda lost me there ;) But I'll see if I can figure out what you meant.
Are you referring to the fstab on the newly cloned drives?

This is what it looks like after I chroot'ed to it::


IMG_20181108_131107.jpg
IMG_20181108_131059.jpg
IMG_20181108_131133.jpg
IMG_20181108_131048.jpg

Rudi Ahlers

unread,
Nov 8, 2018, 6:38:21 AM11/8/18
to house...@googlegroups.com
Hi Mark,

1. Yes I can mount the root drive manually and see the content on it
2. Yes it seems Grub loads successfully. What do I need to check in the grub config? This is CentOS 5 so it still use the old style Grub. I don't know Grub off-hand but some stuff I searched on-line was mostly related to Grub 2 and didn't help.
3. I am not 100% sure how to check, but the old server is, really old - I doubt it has EUFI. The new Dell T30 has legacy boot mode enabled.
4.  I tried that already but failed. I followed the instructions for CentOS on this page, https://wiki.centos.org/TipsAndTricks/CreateNewInitrd but fail when I get to:


cp -p /boot/initrd-$(uname -r).img /boot/initrd-$(uname -r).img.bak


since the CentOS CD I booted from has a different kernel than what is installed.
IMG_20181108_133358.jpg

Gert van den Berg

unread,
Nov 8, 2018, 6:53:32 AM11/8/18
to house4hack


On Thursday, November 8, 2018 at 1:24:12 PM UTC+2, Rudi Ahlers wrote:
Gert, you kinda lost me there ;) But I'll see if I can figure out what you meant.
Are you referring to the fstab on the newly cloned drives?

This is what it looks like after I chroot'ed to it::

Let me try with a proper keyboard....

When do you get the error?

The basic boot process tend to be:
1. Boot loader loads kernel with initrd from boot directory / partition.
2. system in initrd load drivers to access things not supported by boot loader (e.g. LVM), mounts real root partition (instead of initrd one) and continues boot.

For step one the GRUB config (or the contents of the line when you choose to edit the option before booting from the GRUB prompt - there are root-related parameters that can be passed to the kernel) and an LS of the contents of /boot or the boot partition would be useful.

For step 2, the contents of the initrd is relevant (its gets generated (possibly by mkinitrd) when kernels or drivers gets installed and (amongst other things) include the fstab used for the step two part). Usually if it fails here, you can get to a horrible busybox prompt for some basic troubleshooting... (initrds tend to be compressed CPIO archives)

If it gets to some kind of recovery prompt, the output of "find /dev/sd* /dev/disk* -ls" might be useful, to see which labels, UUIDs, etc is seen by udev...

A video of the boot can also be useful...

Gert van den Berg

unread,
Nov 8, 2018, 6:55:56 AM11/8/18
to house4hack


On Thursday, November 8, 2018 at 1:38:21 PM UTC+2, Rudi Ahlers wrote:
Hi Mark,

1. Yes I can mount the root drive manually and see the content on it
2. Yes it seems Grub loads successfully. What do I need to check in the grub config? This is CentOS 5 so it still use the old style Grub. I don't know Grub off-hand but some stuff I searched on-line was mostly related to Grub 2 and didn't help.
3. I am not 100% sure how to check, but the old server is, really old - I doubt it has EUFI. The new Dell T30 has legacy boot mode enabled.
4.  I tried that already but failed. I followed the instructions for CentOS on this page, https://wiki.centos.org/TipsAndTricks/CreateNewInitrd but fail when I get to:


cp -p /boot/initrd-$(uname -r).img /boot/initrd-$(uname -r).img.bak

You should be able to replace the $(uname -r) with the relevant kernel versions when doing it from the the chroot with a different kernel, "2.6.18-8.el5" it seems from the screenshots...

Rudi Ahlers

unread,
Nov 8, 2018, 11:23:23 AM11/8/18
to house...@googlegroups.com
Thanx, I did that and it got a bit further, and then hangs with an fsck error, as below. I can't press CTR+D or supply the password.

When I DD's the drives there were no errors, but I noticed at one stage some warnings about "partition 3 does not start on physical sector boundary", and figured this has todo with the fact that I cloned a 250GB HDD to a 1TB HDD.



--
--
You received this message because you are subscribed to the Google
Groups "house4hack" group.
To post to this group, send email to house...@googlegroups.com
To unsubscribe from this group, send email to
house4hack+...@googlegroups.com
---------------------------------------------------------------------------------------------
www.house4hack.co.za | Centurion Tue 18-21 & Sat 9-14 | Randburg Wed 18-21
---------------------------------------------------------------------------------------------
---
You received this message because you are subscribed to the Google Groups "house4hack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to house4hack+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
IMG_20181108_181329.jpg
IMG_20181108_181202.jpg

Gert van den Berg

unread,
Nov 8, 2018, 11:37:18 AM11/8/18
to house...@googlegroups.com
On Thu, Nov 8, 2018 at 6:23 PM Rudi Ahlers <rudia...@gmail.com> wrote:
>
> Thanx, I did that and it got a bit further, and then hangs with an fsck error, as below. I can't press CTR+D or supply the password.

You might be able to do the fsck from a CD... (Any Linux distro should
work, unless you have exotic hardware) (A newer distro's live cd might
have the advantage of a newer fsck version...)

> When I DD's the drives there were no errors, but I noticed at one stage some warnings about "partition 3 does not start on physical sector boundary", and figured this has todo with the fact that I cloned a 250GB HDD to a 1TB HDD.

It might be an AF 512e to native AF 4K clone instead...

Creating a partition of the smae or a larger size and DDing the
partition should fix that... (For booting, you might need to reinstall
the bootloader). One way: (this seems to be for GRUB2 though:
https://wiki.archlinux.org/index.php/GRUB#Installation ) This has some
grub-legacy installation info... https://wiki.gentoo.org/wiki/GRUB

Rudi Ahlers

unread,
Nov 14, 2018, 1:49:12 AM11/14/18
to house...@googlegroups.com
Hi Gert,

I am not sure if I am doing this right, as every time I copy /dev/sdb[x] to /dev/sda[x] I get the same error message saying the partition dies not start on a physical sector.

The command I use(d) is: dd if=/dev/sdb1 of=/dev/sdb1 conv=sync.

I also tried it with conv=sync,noerror

--
--
You received this message because you are subscribed to the Google
Groups "house4hack" group.
To post to this group, send email to house...@googlegroups.com
To unsubscribe from this group, send email to
house4hack+...@googlegroups.com
---------------------------------------------------------------------------------------------
www.house4hack.co.za     |    Centurion Tue 18-21 & Sat 9-14    |    Randburg Wed 18-21
---------------------------------------------------------------------------------------------
---
You received this message because you are subscribed to the Google Groups "house4hack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to house4hack+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
IMG_20181114_084756.jpg

Gert van den Berg

unread,
Nov 14, 2018, 2:24:26 AM11/14/18
to house...@googlegroups.com
On that sccreenshot, /dev/sda is an AF 512e disk:
https://en.wikipedia.org/wiki/XFA#Compatibility

Not aligning should not break it, but it can slow it down
dramatically... (Editing a 4k filesystem cluster requires reading and
editing two physical sectors if it is not aligned)

You are probably better off creating new, properly aligned partitions
(with the exact number of LBA sectors) on /dev/sda and then DDing the
data over... (fdisk and parted can take exact LBA / sector numbers for
partition sizes...)

If you need to boot off it and recreated the partitions, you would
need to reinstall the bootloader... The recovery options might be
capable of that, or use the instructions from Gentoo / Arch's manual
install instructions to get that done... (If you cloned the entire
disk first and then deleted and recreated the partitions properly
aligned, the bootloader might still be there)
This should work as well:
https://www.centos.org/docs/5/html/5.1/Installation_Guide/s2-rescuemode-boot-reinstall-bootloader.html

Is /dev/sdb healthy and working?

(Most of the defaults for the aligned mode in the partitioning tool,
starts the first partition at 1M into the drive, although say sector
64 instead of sector 63 should work as well)

sda4 ran out of space due to being an extended partition... You should
be cloning the partitions in that (probably sda5-sda8) instead of the
extended partition itself. (GPT fixed that hack)
https://en.wikipedia.org/wiki/Extended_boot_record (It is a horrible hack)

The output of "sfdisk -d " on both drives can be useful... (Via
https://unix.stackexchange.com/a/12988/28015 )

Gert van den Berg

unread,
Nov 14, 2018, 2:26:13 AM11/14/18
to house...@googlegroups.com
First link was wrong, old clipboard content
https://en.wikipedia.org/wiki/Advanced_Format#512e

Rudi Ahlers

unread,
Nov 14, 2018, 2:56:28 AM11/14/18
to house...@googlegroups.com
How will this influence using new hardware in future? I want to use RAID0 on the new server. Would the 512e not be a problem?


/dev/sdb is working fine in the old server. 

The server runs an OS called Pick D3 (https://en.wikipedia.org/wiki/Pick_operating_system) which was licensed many years ago for this server and the client doesn't want to buy a new license just for the upgrade since he's not upgrading the application version. The supplier said it's fine to is like that but he doesn't have the installation media anymore and the guy who installed it, say 20 years ago, has passed away. The server is very outdated and needs to be upgraded before it completely dies. 


Gert van den Berg

unread,
Nov 14, 2018, 3:33:43 AM11/14/18
to house...@googlegroups.com
512e decently emulates 512 byte sectors (some sources (the wiki page
linked in next paragraph) say misaligned access might slow down access
dramatically though)

Take a look at this:
https://www.thomas-krenn.com/en/wiki/Partition_Alignment (With RAID,
you might want to align you partitions to stripe boundaries...)

4k native disks will mess with older systems. (Linux might support
arbitrary sector sizes, the support in old versions was likely not
very well tested though)

Old stuff tend to be easier to run in VMs...

If the disk is old, keeping a copy of the entire disk and each
individual partition in files somewhere might be useful in case the
hardware fails...

(You might be able to get a decent setup by getting the "sfdisk -d"
output for /dev/sdb, modifying it to align and then loading it onto
/dev/sda) (You might still want to DD the first 63 sectors from the
old disk first, it might bring over the bootloader...) (But it will
also contain the partition table (in the MBR - sector 0), that you
want to overwrite if you want to get stuff aligned...) (If you are
brave, you might copy the first 446 bytes from the MBR as well...) See
https://en.wikipedia.org/wiki/Master_boot_record

Andrew Turpin

unread,
Nov 14, 2018, 2:03:02 PM11/14/18
to house...@googlegroups.com
We have a supplier who knows D3 well and they run it on Windows... the data and data dictionary can be exported and imported into a newer version.  We no longer use D3 as it was unreliable and suffered from heap errors.

Ping me out of band if you want to be put in touch with 253 Tech (Durban based)

Regards,
Andrew 

Rudi Ahlers

unread,
Nov 21, 2018, 3:07:19 AM11/21/18
to house...@googlegroups.com
Hi Andrew, 

Thanx. The client has decided to move everything to a old Windows server instead. The problem is that he doesn't want to buy a new D3 to to keep his archives. He runs D3 7.3.0. We could still use that version on the new server if I could get installation media, but Rocksoft doesn't have it anymore. 
Reply all
Reply to author
Forward
0 new messages