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

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

If you have copied extracted files onto a partition on the SD card you have installed it the wrong way - this is why you are having problems. Nowhere on our website does it recommend that you install using this method. This is something you can do for Noobs, not OSMC.

As I said earlier, if you are not using the OSMC installer then you must use a tool that writes a disk image directly to the drive. Such as win32diskimager on windows, disk utility or dd on a Mac, or dd on linux. Writing a disk image and copying files to an existing partition are not the same thing at all.

Simply copying extracted files onto an existing partition will not work properly because the installer is unable to repartition the drive as it is expecting to find a 240MB fat32 partition at the start of the drive followed by un-partitioned space for the remainder of the drive. This 240MB partition is already present inside the disk image.

There’s no bug here, you’re just not following the recommended install methods.

I have to agree with cretti. I had the same problem with my micro sd card. Definitely a genuine new card from amazon. I followed the advice to repartition ( I used gparted to partition my card) and then used image writer to transfer the extracted downloaded image to the sd card. Then booted/turned on the RPI2 and OSMC installed perfectly.