[Solved] [RC] Install failed: can't mount root

I’m trying to install osmc on my second Pi 2. I’m using the exact same SD card as I did on my first Pi 2 (with no problems), but with another USB stick. Both the SD card and the USB stick are 8GB. When I plug it in I get the countdown for installing on USB, but then it just says “Install failed: can’t mount root”. I’ve tried again after formatting both the SD card and the USB stick with the same result.

Is there an install.log on the SD card?

Can I see it?

Thu Jan 1 00:00:09 1970 Starting OSMC installer
Thu Jan 1 00:00:17 1970 Detecting device we are running on
Thu Jan 1 00:00:17 1970 Mounting boot filesystem
Thu Jan 1 00:00:17 1970 Trying to mount to MNT_BOOT (/mnt/boot
Thu Jan 1 00:00:17 1970 Using device.boot: /dev/mmcblk0p1 and FS: vfat
Thu Jan 1 00:00:17 1970 Preseed file found, will attempt to parse
Thu Jan 1 00:00:17 1970 Found a definition for storage: usb
Thu Jan 1 00:01:25 1970 Creating root partition
Thu Jan 1 00:01:25 1970 From a root partition of /dev/sda1, I have deduced a base device of /dev/sda
Thu Jan 1 00:01:25 1970 Must mklabel as root fs is on another device
Thu Jan 1 00:01:25 1970 Going to mklabel with device: /dev/sda with a label type of MSDOS
Thu Jan 1 00:01:26 1970 Calling mkpart for device: /dev/sda and fs: ext4 with start 4096s and end 100%
Thu Jan 1 00:01:27 1970 Calling fmtpart for partition /dev/sda1 and fstype ext4
Thu Jan 1 00:01:28 1970
Thu Jan 1 00:01:28 1970 Mounting root
Thu Jan 1 00:01:28 1970 Trying to mount to MNT_ROOT (/mnt/root
Thu Jan 1 00:01:28 1970 Using device.root: /dev/sda1
Thu Jan 1 00:01:28 1970 Error occured trying to mount root of /dev/sda1
Thu Jan 1 00:01:28 1970 Halting Install. Error message was: can’t mount root

The issue here is mounting the USB it seems. Can you try another USB?

S

That might explain why I had problems using this USB stick to install linux on a laptop as well (I thought the laptop was at fault). I don’t have another USB stick here at the moment, but I’ll try again and report back when I have one.

Just tried with a different USB, and it worked. So apparently the one I used first was DOA.

Hi,

i’m trying to set up my raspi2 with osmc rc2 at the moment and keep getting the same error. (it’s a san disk hc1 class4 32gb micro sd card)

install log:
Thu Jan 1 00:00:09 1970 Starting OSMC installer
Thu Jan 1 00:00:17 1970 Detecting device we are running on
Thu Jan 1 00:00:17 1970 Mounting boot filesystem
Thu Jan 1 00:00:17 1970 Trying to mount to MNT_BOOT (/mnt/boot
Thu Jan 1 00:00:17 1970 Using device.boot: /dev/mmcblk0p1 and FS: vfat
Thu Jan 1 00:00:17 1970 No preseed file was found
Thu Jan 1 00:00:17 1970 Creating root partition
Thu Jan 1 00:00:18 1970 From a root partition of /dev/mmcblk0p2, I have deduced a base device of /dev/mmcblk0
Thu Jan 1 00:00:18 1970 Determined 255 MB as end of first partition
Thu Jan 1 00:00:18 1970 Calling mkpart for device: /dev/mmcblk0 and fs: ext4 with start 257M and end 100%
Thu Jan 1 00:00:20 1970 Calling fmtpart for partition /dev/mmcblk0p2 and fstype ext4
Thu Jan 1 00:00:58 1970 Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=2 blocks, Stripe width=1024 blocks
1937712 inodes, 7750400 blocks
387520 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
237 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000

Allocating group tables: 0/237 done
Writing inode tables: 0/237 done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 0/237 2/237 4/237 done

Thu Jan 1 00:00:58 1970 Mounting root
Thu Jan 1 00:00:58 1970 Trying to mount to MNT_ROOT (/mnt/root
Thu Jan 1 00:00:58 1970 Using device.root: /dev/mmcblk0p2
Thu Jan 1 00:00:58 1970 Error occured trying to mount root of /dev/mmcblk0p2
Thu Jan 1 00:00:58 1970 Halting Install. Error message was: can’t mount root

If you have issues with USB keys or memory cards i personally have huge success by cleaning it in windows and till now i only had one very old memory card i couln’t bring back to life.

Open RUN (WinKey + R) and type diskpart then press enter (make sure it’s run as administrator!)
when it’s ready type list disk and find the disk number for the usbkey/memorycard that have the total capacity matching
Then type select disk [NUMBER] and press enter. Make sure it’s the right disk or you will loose data!!!
Then type clean and press enter
Then type create partition primary and press enter
Then type select partition 1 and press enter
Then type format fs=fat32 quick and press enter
Then type active and press enter
Then type assign and press enter
Then type exit and press enter

Now the usb stick or memory card should be up and running flawlessly again!
(Sry for all the “Then type **** and press enter”, but copy paste was just the easy way)

1 Like

@geekgarage:
thanks for your advice but sadly the error keeps occuring.

:-/

@domi2205
Seem like you have a damaged sector on your usb stick then. not much you can do about that

uhm, I don’t use an USB stick, as I said it’s a micro SD Card and at the moment I’m pretty confused because the card is brand new and works perfectly on any other system :frowning:

No clue to what it could be then, other than you might have a fake card that reports more space than there actually are. So unless you bought it from a trusted source, like a known store or alike, i would go do some read write tests on the card. like move a file around 25-30GB to the card and see of you can read the file without errors after transfer is complete. If you can’t, then it’s a fake, and then that’s your issue. Often they have like a 2-4GB of chip but the controller reports 32GB and the case and box it comes in looks authentic so any one can be fooled easily, ive been fooled once, lucky for me i didn’t pay much and the store i bought it in replaced it with an authentic twice the size as an apology.

No the card is original I purchased it on amazon. But I found another SD card at home (8GB) and was able to install osmc without any problems.

:slight_smile:

Well just because it’s from Amazon doesn’t mean that it’s authentic, thats a common mistake :slight_smile:
http://www.amazon.co.uk/gp/aw/cr/rR1K9R8Z9VQG9S9

This is most likely too late for the original poster, but I had the same issue and worked through it quite simply, it was an entirely ‘noobie’ mistake to make - In my case my MicroSD card had a single partition created on it which had the entire drive space assigned to it, as such the installer was unable to create a secondary partition on which to install the software (and make bootable). - So, ensure that the installer software is on a small partition leaving plenty of unpartitioned space remaining on the card for the install process to use. - Hope this helps someone at some point.

Other general tips for other noobies out there - 1) Leave space on the media for the operating partition to be installed; 2) FAT32 formatting for primary partition (where you place the installation files), 3) remember to mark primary partition active and make bootable. - Once I got all three of these sorted, I was fine.

I really don’t know what you’re talking about here - the OSMC installer writes the entire image file to the SD card with the correct size FAT32 partition, then when the target installer runs (the first boot on the Pi where it says installing) it partitions the rest of the SD card automatically and installs the OS there.

Regardless of whether you use the OSMC installer or something like win32diskimager to directly image the unzipped image file, no manual partitioning is needed. It is all handled for you automatically.

So if the contents of the image are copied manually onto an sd card without using the installer, onto the only, single and fully allocated partition… When run for the first time, it will run and attempt to install, but… As I said, if there’s no space remaining on the sd card then you get the ‘cannot mount root’ error.

That’s my experience and possibly the cause of others’ similar errors too. - perhaps we all didn’t use the installer??

The install image contains a partition table already with a single 240MB fat partition - you don’t “copy” the install image to the card as a file, you write it as an image to the first 240MB of the disk - this overwrites any existing partition table.

Thus after writing the image you have a partition table with a single 240MB fat partition and the rest of the drive is unallocated with random data from any previous installs.

During the first boot the drive is non destructively repartitioned to add a second ext4 partition which is sized to fit all the remaining disk space and the OS is installed there.

The original fat partition remains and becomes the /boot partition with the kernel and Pi firmware files.

It definately works properly if you just write the raw image to the disk using dd or win32diskimager - I’ve done it many times. This is all the OSMC installer does as well - the only difference is it can also write a preseed.cfg to preconfigure your network settings.

There can’t be no space remaining on the drive unless your SD card is too small to fit an install of OSMC. I’m not sure what the bare minimum size would be but I’d say it’s probably about 2GB.

Thank you for your helpful replies.

However, you may be missing the point of my posts:

  • I don’t have this issue any longer (the one reported by the original poster…)
  • I did have, I saw the same error messages.
  • I found out why, so I thought I’d share my findings.
  • obviously I didn’t use a correct method to initiate my install image, but I did get it to boot and attempt an install - that’s when I received the reported error state.

If anyone else has this same issue and searches for the error message, I’m hoping they’ll find these details:

  • you, like me, likely stuffed up the prep of your installation sd card and ended up copying files over to a fully formatted card. The error code occurs when the installation is unable to create the second ext partition during installation, it is the unable to mount the root.

Prep it in the proper way and you won’t have this issue.

All of the other threads I’ve read about this talk about bad sectors on sd cards or trying other cards. They don’t stop to ask, how did you prep your install partition and is there space left on the sd card for the operational, secondary, ext partition to be created.

That’s all from me. Signing off now. Thanks. Over and out.

We recommend you use the OSMC installer in the future.

Sam