Switch to USB

Hi guys,
im running OSMC on a pi3 from an SD card but im running out of space, I want to switch my install to a USB drive with more space, but I desperately want to avoid reinstalling from scratch as I have a hell of a lot of stuff installed besides OSMC.

Ive imaged my sd card, then copied that to the USB Hard drive, but what changes need to be made to get it to boot from the USB?

I know an SD card will still be needed in the Pi, im cool with that, I tried changing the cmdline.txt to point to the UUID of the USBs ext4 partition, but it still boots from the sd card.

Is what im trying to achieve even possible?

Any hints are appreciated.

Cheers

Have you looked at this thread?

It’s not a perfect fit for your situation, but might get you onto the right track.

You need to change fstab as well.

Thanks but I’m not sure that’s gonna help, its just recommending installing from scratch which I want to avoid.

I thought this as well, but in my fstab the only reference to the ext4 partition is commented out, I tried uncommenting it and using the UUID of my USB ext4 partition, but it’s still booting from the sd card.

We’re a bit in the dark about what exactly you’ve done. If you could give a few more details, perhaps someone will spot what’s happening.

This worked for me:
/dev/mmcblk0p1 /boot vfat defaults,noatime,noauto,x-systemd.automount 0 0
# rootfs is not mounted in fstab as we do it via initramfs. Uncomment for remount (slower boot)
LABEL=OSMCsystem / ext4 defaults,noatime 0 0

If you just did a clone of the card onto the USB stick, the UUID will be the same. Change it or use the label instead. As you can see, I labelled mine OSMCsystem.

Sorry I thought I was clear…
I’ve cloned my sd card to a USB drive, but I’m unable to actually boot from the USB drive, its still booting from the sd card.

I thought I’d just have to make changes to the /boot/cmdline.txt (pointing it towards the USB drive instead of the sd card) but no joy.

Ok I’ll try that, just to be clear what changes, if any , did you make to cmdline.txt?

Cheers.

Not sure to be honest - I’ve wiped that SD card now. I think it was just root=/dev/sda3 (I was using the third partition on a big disk). This is on a Pi2, but should be the same.

Cheers, that works but I’m hesitant to use the /dev/sdb2 approach as I have two large storage drives attached by USB as well, so that identifier can change if I’m not mistaken and it ‘could’ fail to boot depending on whether these other drives are switched on.

I was under the impression that UUID should be used, as that never changes, but if I use the UUID in cmdline.txt , it just boots from the sd card.

Something strange going on, I’ll leave it for now with sdb2 in there but I’m not sure that this approach is recommended.

Thanks for your input.

Just noticed I’ve been a complete idiot lol, both partitions have the same UUID lol, I’ll change one, thanks.

You are right. I have just one big disk attached to my Pi and it never boots with anything else plugged in so I got away with it :wink:

Have a look here.

I lied. I just found this cmdline.txt which was probably what I was using:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=405db4a3-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

Can’t remeber where I got it from, but may give you some clues.

Cheers chaps, I changed the uuid with tune2fs, used the new uuid in cmdline.txt and it’s booting as expected now.

Obvious what was happening now I think about it lol.

1 Like

Interesting that you used PARTUUID, not UUID. I actually read here that you need to use UUID!

Maybe that’s why I couldn’t get it to work when I tried it recently. But it was working once with kernel 4.x. The thread says you needed PARTUUID with kernel 3.x.