GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Move Pi home from SD card to a HDD

Sat Jul 21, 2018 6:40 am

I want to make my external USB HDD the default place to store my files instead of it storing on the SD card.
Basically when I save something to "My Documents" or "Desktop" on my Pi at present I am of the understanding that the storage is on the SD card am I correct?
If so how do I make the storage my external USB HDD?
My thinking is that the SD card has limited read/write abilities and the HDD will have more.
Everything I have looked at tells me how to mount a HDD (which I have done) but not how to make it the default storage place.

GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Move Pi home from SD card to a HDD

Sun Jul 22, 2018 8:23 am

GAP wrote:
Sat Jul 21, 2018 6:40 am
I want to make my external USB HDD the default place to store my files instead of it storing on the SD card.
Basically when I save something to "My Documents" or "Desktop" on my Pi at present I am of the understanding that the storage is on the SD card am I correct?
If so how do I make the storage my external USB HDD?
My thinking is that the SD card has limited read/write abilities and the HDD will have more.
Everything I have looked at tells me how to mount a HDD (which I have done) but not how to make it the default storage place.
Any help greatly appreciate

DirkS
Posts: 8435
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Move Pi home from SD card to a HDD

Sun Jul 22, 2018 8:39 am

A couple of options: create the directories on the HDD and create symbolic links to these on the SD card.
Or you could move the complete /home directory to the HDD (search e.g. for 'linux move home to another partition')

epoch1970
Posts: 1838
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Move Pi home from SD card to a HDD

Sun Jul 22, 2018 11:03 am

I will add a third option: keep the home where it is and add a bind mount from the "real" home on USB to the minimum home dir skeleton on the SD.
This way if the mount fails (USB drive missing), you still have a working /home.

I think the exact same idea would work with an overlay mount, with /home/<username> set as the read-only bottom layer and the directory on USB as the read-write top layer.
I'm not sure there is any advantage to overlay vs. bind mounting.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

LTolledo
Posts: 289
Joined: Sat Mar 17, 2018 7:29 am

Re: Move Pi home from SD card to a HDD

Sun Jul 22, 2018 1:38 pm

Am assuming its the same RPi3B+ from the last topic we discussed, and the Raspbian Stretch was installed from an image file, not from NOOBs

The method below might be a considered extreme by others.
Caution! The HDD to be used in this procedure will be erased. Back up your HDD first.

1. On the RPi3B+'s Stretch Desktop, using SD Card Copier... clone your whole current Raspbian Stretch microSD to a HDD/SSD. dont check the new partition UUID
2. On one of your spare small capacity microSD cards (fake ones will work just fine) format it to FAT32
3. Download and copy the bootcode.bin file to the FAT32 formatted microSD card. Dont copy any other file to that microSD card
download link is
https://www.raspberrypi.org/documentati ... /README.md

4. With the power removed from the RPi3B+ remove the Raspbian Stretch microSD card.... save it as a backup
5. Insert the newly formatted FAT32 microSD card with bootcode.bin to the microSD slot
6. Plug in your USB HDD/SSD with the cloned Raspbian Stretch to the RPi3B+'s vacant USB port.
7. Power up the RPi3B+ and let it boot. It may take some time during first boot as it needs to expand the file system area.

So there you have it, you have transferred/moved your system files (/home/pi included of course) to HDD/SSD

Note: I tested this method first before posting the procedure....so I know it works.
"Don't come to me with 'issues' for I don't know how to deal with those...
Come to me with 'problems' and I'll help you find solutions"

GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Move Pi home from SD card to a HDD

Mon Jul 23, 2018 9:53 am

LTolledo wrote:
Sun Jul 22, 2018 1:38 pm
Am assuming its the same RPi3B+ from the last topic we discussed, and the Raspbian Stretch was installed from an image file, not from NOOBs

The method below might be a considered extreme by others.
Caution! The HDD to be used in this procedure will be erased. Back up your HDD first.

1. On the RPi3B+'s Stretch Desktop, using SD Card Copier... clone your whole current Raspbian Stretch microSD to a HDD/SSD. dont check the new partition UUID
2. On one of your spare small capacity microSD cards (fake ones will work just fine) format it to FAT32
3. Download and copy the bootcode.bin file to the FAT32 formatted microSD card. Dont copy any other file to that microSD card
download link is
https://www.raspberrypi.org/documentati ... /README.md

4. With the power removed from the RPi3B+ remove the Raspbian Stretch microSD card.... save it as a backup
5. Insert the newly formatted FAT32 microSD card with bootcode.bin to the microSD slot
6. Plug in your USB HDD/SSD with the cloned Raspbian Stretch to the RPi3B+'s vacant USB port.
7. Power up the RPi3B+ and let it boot. It may take some time during first boot as it needs to expand the file system area.

So there you have it, you have transferred/moved your system files (/home/pi included of course) to HDD/SSD

Note: I tested this method first before posting the procedure....so I know it works.
Yes it is one in the same, I only have one at this point in time, and the Raspbian Stretch was installed from NOOBs.

I do not have a spare small capacity microSD card, so guess I am behind the 8 ball from the start.

So I will have to go and get a microSD card before going any further with this.

At present the HDD is formatted as NTFS if I change it to FAT32 will it work with XP?

I'll be back when I have the SD card my mentor :) ;)

LTolledo
Posts: 289
Joined: Sat Mar 17, 2018 7:29 am

Re: Move Pi home from SD card to a HDD

Mon Jul 23, 2018 10:59 am

Sad to say that the procedure might not work with a NOOBs installed system. The system I tested was using a raspbian stretch image.
But may give it a try later on...

As the HDD will be formatted after system transfer, it will be in EXT4 format (the format used by raspbian root partition), and may not be readable by the WinXP system should you decide to plug the USB HDD back to the WinXP system later on.

The other solutions proposed by epoch1970 and/or DirkS may be the next viable alternative solutions....

Added:
There still exist ways for WinXP to read EXT4 formatted drives, but most of those will give read-only access to the EXT4 partition of the HDD.
"Don't come to me with 'issues' for I don't know how to deal with those...
Come to me with 'problems' and I'll help you find solutions"

GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Move Pi home from SD card to a HDD

Wed Jul 25, 2018 9:14 am

LTolledo wrote:
Sun Jul 22, 2018 1:38 pm
Am assuming its the same RPi3B+ from the last topic we discussed, and the Raspbian Stretch was installed from an image file, not from NOOBs

The method below might be a considered extreme by others.
Caution! The HDD to be used in this procedure will be erased. Back up your HDD first.

1. On the RPi3B+'s Stretch Desktop, using SD Card Copier... clone your whole current Raspbian Stretch microSD to a HDD/SSD. dont check the new partition UUID
2. On one of your spare small capacity microSD cards (fake ones will work just fine) format it to FAT32
3. Download and copy the bootcode.bin file to the FAT32 formatted microSD card. Dont copy any other file to that microSD card
download link is
https://www.raspberrypi.org/documentati ... /README.md

4. With the power removed from the RPi3B+ remove the Raspbian Stretch microSD card.... save it as a backup
5. Insert the newly formatted FAT32 microSD card with bootcode.bin to the microSD slot
6. Plug in your USB HDD/SSD with the cloned Raspbian Stretch to the RPi3B+'s vacant USB port.
7. Power up the RPi3B+ and let it boot. It may take some time during first boot as it needs to expand the file system area.

So there you have it, you have transferred/moved your system files (/home/pi included of course) to HDD/SSD

Note: I tested this method first before posting the procedure....so I know it works.
OK I have spare SD cards.
Can I "flash" Raspbian 'Stretch' from the net to a card using my win 10 machine and "Etcher" or can I get it from my NOOBS card?
If yes then I should follow the instructions after backing up my HDD - yes?
The formatting to FAT32 should let it be used by Win XP over the network - yes?
Do I now have to go all the way through the Samba and network steps again?

LTolledo
Posts: 289
Joined: Sat Mar 17, 2018 7:29 am

Re: Move Pi home from SD card to a HDD

Thu Jul 26, 2018 4:15 am

GAP wrote:
Wed Jul 25, 2018 9:14 am

OK I have spare SD cards.
Can I "flash" Raspbian 'Stretch' from the net to a card using my win 10 machine and "Etcher" or can I get it from my NOOBS card?
If yes then I should follow the instructions after backing up my HDD - yes?
The formatting to FAT32 should let it be used by Win XP over the network - yes?
Do I now have to go all the way through the Samba and network steps again?
As your Raspbian Stretch was installed using NOOBs, cloning it to HDD and trying to boot from it will result in failure. I have confirmed this on one of my setup. Tried to make it work but it just doesnt. Gave up before I loose sleep.

You have two choices, you may choose any 1 from below.

1. If you have not installed other packages to your current Stretch installation (aside from samba, samba-common-bin, smbclient, ntfs-3g, gparted) then its better to do an image installation directly to HDD. Just save your current smb.conf file to PC or other media. We will need that later on. You may need to set the static IP address again.

The file to be used is the latest raspbian stretch image file (as of this writing its 2018-06-27-raspbian-stretch.img). The link is
https://www.raspberrypi.org/downloads/raspbian/

2. If you have installed many packages to your current Stretch and would like to preserve all settings (so as you will need not to do all "hair- pulling" configurations again) then we can export your current Raspbian Stretch out from NOOBs (which contains 5 partitions) to "clean" Raspbian Stretch (which contains just 2 partitions).

The procedure to export out from NOOBs is in the link below: Read the procedure carefully before attempting to proceed.
https://www.makeuseof.com/tag/make-rasp ... -boot-usb/

I used the procedure in the link above to do native USB Flash Drive booting (no microSD card in microSD slot). Almost all of my RPis (except for RPiZ, RPiZW, RPiZWH) are now native USB boot.

Before doing the 2nd choice, I suggest making an image backup first, plug in your current raspbian stretch microSD card in a Win10PC (disregard all errors presented by windows), and using Win32DiskImager, make a backup (read) of your raspbian stretch microSD card in windows. You need to do this just in case you made a mistake doing the export-out procedure, you can restore back from the backup image and start again.

As it is a new procedure for you, I suggest you try it out first on any spare USB Flash Memory/Drive/Stick/Key that you have. At least the same size as your current Raspbian Stretch microSD card.
If you are already confident that the new system works as intended, then you may transfer (clone) that system to a USB HDD.

Also as mentioned in my previous post, the USB Memory/Drive system will be formatted as EXT4. WinXP will be able to access files in the EXT4 formatted folder if those are shared via samba. (My NAS HDDs are formatted in EXT4, but I access my media from NAS via samba and play it in Windows, Android, MacOS and of course, Linux)
However if you try to plug the EXT4 formatted HDD directly to a WinXP pc, the HDD will not be accessible in WInXP (or even in WIn10).

Hope this helps (for the mean time)..
Last edited by LTolledo on Thu Jul 26, 2018 10:23 am, edited 1 time in total.
"Don't come to me with 'issues' for I don't know how to deal with those...
Come to me with 'problems' and I'll help you find solutions"

GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Move Pi home from SD card to a HDD

Thu Jul 26, 2018 4:54 am

WOW Information overload.

I have flashed Stretch to an SD card ran sudo apt-get dist-upgrade so should have latest version and I am now running a bare bones Pi ie nothing plugged into it except monitor mouse etc.
Next I plan to follow the instructions first given but after digesting the newer ones I may go for option 1 with t he OS on the USB HDD then add SAMBA etc later effectively start again but with lessons learned it will not be so daunting.
I still have my NOOBS card to fall back on plus all the data on the USB HDD is copied onto another.

ejolson
Posts: 1722
Joined: Tue Mar 18, 2014 11:47 am

Re: Move Pi home from SD card to a HDD

Fri Jul 27, 2018 5:50 am

GAP wrote:
Thu Jul 26, 2018 4:54 am
WOW Information overload.
With the risk of creating even more information overload, I think it is worth pointing out that moving a user's home directory to the USB drive is distinctly different and easier than moving the entire operating system. If you move everything to the USB drive then the Pi will not boot without it. If you move only the home directory, then it should be possible to boot the Pi sans USB drive and do anything that doesn't involve the user files.

As I'm not sure exactly how you have your Pi setup, let's suppose the USB drive is mounted as /mnt/bigdrive. In this case, a simple way to place a home directory on the USB drive would be with the commands

$ sudo bash
# cd /home
# mv pi /mnt/bigdrive
# ln -s /mnt/bigdrive/pi pi
# exit

The idea is to move the pi user's home directory to the USB drive and then make a symbolic link that points to the new location. Note that the move command assumes there isn't a directory already called pi on the USB drive. Also note that I haven't actually tested the above sequence of commands on a real Raspbian system. However, I have used similar techniques to move home directories to different disks on other Linux systems in the past.

GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Move Pi home from SD card to a HDD

Fri Jul 27, 2018 11:18 am

ejolson wrote:
Fri Jul 27, 2018 5:50 am
GAP wrote:
Thu Jul 26, 2018 4:54 am
WOW Information overload.
With the risk of creating even more information overload, I think it is worth pointing out that moving a user's home directory to the USB drive is distinctly different and easier than moving the entire operating system. If you move everything to the USB drive then the Pi will not boot without it. If you move only the home directory, then it should be possible to boot the Pi sans USB drive and do anything that doesn't involve the user files.

As I'm not sure exactly how you have your Pi setup, let's suppose the USB drive is mounted as /mnt/bigdrive. In this case, a simple way to place a home directory on the USB drive would be with the commands

$ sudo bash
# cd /home
# mv pi /mnt/bigdrive
# ln -s /mnt/bigdrive/pi pi
# exit

The idea is to move the pi user's home directory to the USB drive and then make a symbolic link that points to the new location. Note that the move command assumes there isn't a directory already called pi on the USB drive. Also note that I haven't actually tested the above sequence of commands on a real Raspbian system. However, I have used similar techniques to move home directories to different disks on other Linux systems in the past.
This sounds like what I am trying to do, I did try putting the boot onto the HDD before but gave up as the drive did not spin up fast enough to start the pi.

The HDD is in pi/media/PIHDD at the moment.

So if I have the boot on the SD card and everything else on the HDD then I can save all my desktop etc on the HDD and thus work around the read/write limitations of the SD card.

Do I put the text in bold into Terminal or somewhere else?

ejolson
Posts: 1722
Joined: Tue Mar 18, 2014 11:47 am

Re: Move Pi home from SD card to a HDD

Fri Jul 27, 2018 3:43 pm

GAP wrote:
Fri Jul 27, 2018 11:18 am
Do I put the text in bold into Terminal or somewhere else?
Before beginning, change the configuration to mount the USB harddisk to a point outside the pi home directory and reboot. Also, make sure the external hard disk is formatted with a suitable filesystem such as ext4. In particular, NTFS does not support all the features needed for a home directory.

What you highlighted in bold is for the terminal, but don't type the $ or # symbols, they represent the prompt where you type the commands. These prompts will be longer on a real Raspbian system, but still end in either $ or #.

GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Move Pi home from SD card to a HDD

Fri Jul 27, 2018 9:21 pm

I have discovered this "Sticky" it is from 2013 would it still be relevant to my situation?
viewtopic.php?f=29&t=44177&start=100
I have been advised to avoid old "how to's".
Last edited by GAP on Fri Jul 27, 2018 10:09 pm, edited 1 time in total.

DirkS
Posts: 8435
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Move Pi home from SD card to a HDD

Fri Jul 27, 2018 9:25 pm

GAP wrote:
Fri Jul 27, 2018 9:21 pm
I have discovered this "Sticky" it is from 2013 would it still be relevant to my situation?
I have been advised to avoid old "how to's".
Which sticky?
If it's viewtopic.php?f=29&t=44177 then have a look at the end of the top post.
Last updated May 2018

GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Move Pi home from SD card to a HDD

Fri Jul 27, 2018 10:13 pm

DirkS wrote:
Fri Jul 27, 2018 9:25 pm
GAP wrote:
Fri Jul 27, 2018 9:21 pm
I have discovered this "Sticky" it is from 2013 would it still be relevant to my situation?
I have been advised to avoid old "how to's".
Which sticky?
If it's viewtopic.php?f=29&t=44177 then have a look at the end of the top post.
Last updated May 2018
Yep thats it thanks for the answer.
And I fixed the post to include the link.

Edit;
After reading the Sticky I have no confidence with my ability to do that without messing it up, so its back to square one for me.
Last edited by GAP on Sat Jul 28, 2018 3:10 am, edited 1 time in total.

LTolledo
Posts: 289
Joined: Sat Mar 17, 2018 7:29 am

Re: Move Pi home from SD card to a HDD

Sat Jul 28, 2018 1:21 am

Can you refresh me on your HDD specs?

is it....

a . bus powered (power taken from USB port)

or

b . self powered (with 5V or 12V power adaptor)
"Don't come to me with 'issues' for I don't know how to deal with those...
Come to me with 'problems' and I'll help you find solutions"

GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Move Pi home from SD card to a HDD

Sat Jul 28, 2018 1:41 am

LTolledo wrote:
Sat Jul 28, 2018 1:21 am
Can you refresh me on your HDD specs?

is it....

a . bus powered (power taken from USB port)

or

b . self powered (with 5V or 12V power adaptor)
The HDD is a Western Digital 1TB drive P/N WDBAAU0010HBK-01 it's a self powered HDD.
https://www.cnet.com/products/wd-elemen ... ies/specs/

I now have baselined my network again so I have 2 SD cards that I can use to boot from (NOOBS & Stretch) so I am now back to where I started only not running off NOOBS.

GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Move Pi home from SD card to a HDD

Sat Jul 28, 2018 6:55 am

Step 1 "On the RPi3B+'s Stretch Desktop, using SD Card Copier... clone your whole current Raspbian Stretch microSD to a HDD/SSD. dont check the new partition UUID"

To do this what do I do if I have no spare HDD will a USB stick work?

LTolledo
Posts: 289
Joined: Sat Mar 17, 2018 7:29 am

Re: Move Pi home from SD card to a HDD

Sat Jul 28, 2018 8:15 am

GAP wrote:
Sat Jul 28, 2018 6:55 am
Step 1 "On the RPi3B+'s Stretch Desktop, using SD Card Copier... clone your whole current Raspbian Stretch microSD to a HDD/SSD. dont check the new partition UUID"

To do this what do I do if I have no spare HDD will a USB stick work?
Yes it will... as long as the capacity is the same as the current microSD, or the capacity is larger than the root partition size. (ext: root size = 4.9GB, use 8GB stick or higher)

As you already have an RPi3B+, you may skip steps 2 , 3, and 5. (steps 2, 3 and 5 will only be used if RPi3B+ will not boot from USB).
"Don't come to me with 'issues' for I don't know how to deal with those...
Come to me with 'problems' and I'll help you find solutions"

LTolledo
Posts: 289
Joined: Sat Mar 17, 2018 7:29 am

Re: Move Pi home from SD card to a HDD

Sat Jul 28, 2018 9:22 am

Currently am doing direct HDD installation of Raspbian Stretch. I flashed the 2018-06-27-raspbian-stretch directly to my old 3.5" 250GB HDD in an old 12v powered USB2.0 HDD case,

Powering both the HDD and the RPi3B+ at the same time wont boot the RPi3B+
so, I powered the HDD first, then after about 5 secs later I powered the RPi3B+.... and it booted. Yay!

currently am doing apt update and apt upgrade on the test system.... and install my favorite packages later....(of course that includes samba and samba-common-bin).

Edit: Just finished the fresh installation

Code: Select all

[email protected]:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       230G  4.5G  216G   3% /
devtmpfs        460M     0  460M   0% /dev
tmpfs           464M     0  464M   0% /dev/shm
tmpfs           464M   13M  452M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/sda1        43M   22M   21M  52% /boot
tmpfs            93M     0   93M   0% /run/user/1000

[email protected]:~ $ blkid
/dev/sda1: LABEL="boot" UUID="6228-7918" TYPE="vfat" PARTUUID="2b714324-01"
/dev/sda2: LABEL="rootfs" UUID="6bfc8851-cf63-4362-abf1-045dda421aad" TYPE="ext4" PARTUUID="2b714324-02"

[email protected]:~ $ lsusb
Bus 001 Device 005: ID 152d:2329 JMicron Technology Corp. / JMicron USA Technology Corp. JM20329 SATA Bridge
Bus 001 Device 004: ID 062a:4c01 Creative Labs 
Bus 001 Device 006: ID 0424:7800 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

[email protected]:~ $ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0  43.2M  0 part /boot
└─sda2   8:2    0 232.9G  0 part /
"Don't come to me with 'issues' for I don't know how to deal with those...
Come to me with 'problems' and I'll help you find solutions"

ejolson
Posts: 1722
Joined: Tue Mar 18, 2014 11:47 am

Re: Move Pi home from SD card to a HDD

Sat Jul 28, 2018 6:35 pm

LTolledo wrote:
Sat Jul 28, 2018 9:22 am
Powering both the HDD and the RPi3B+ at the same time wont boot the RPi3B+
so, I powered the HDD first, then after about 5 secs later I powered the RPi3B+.... and it booted.
This means your Pi will not automatically reboot when the power returns after a power cut. I prefer my file server to not require manual intervention under those circumstances.

You can circumvent this problem by keeping the boot partition on the SD card and putting only the root filesystem and swap partitions on the USB drive. For a larger drive I would make a 24GB partition for root, a 2GB partition for swap and use the remaining space to hold the home directories and data.

LTolledo
Posts: 289
Joined: Sat Mar 17, 2018 7:29 am

Re: Move Pi home from SD card to a HDD

Sat Jul 28, 2018 9:34 pm

ejolson wrote:
Sat Jul 28, 2018 6:35 pm
You can circumvent this problem by keeping the boot partition on the SD card and putting only the root file system and swap partitions on the USB drive.
That is exactly what I had in mind when I finished setting up the test installation....
Now looking for at least 2 procedures to do just that....
"Don't come to me with 'issues' for I don't know how to deal with those...
Come to me with 'problems' and I'll help you find solutions"

GAP
Posts: 94
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Move Pi home from SD card to a HDD

Sat Jul 28, 2018 10:01 pm

GAP wrote:
Sat Jul 28, 2018 6:55 am
Step 1 "On the RPi3B+'s Stretch Desktop, using SD Card Copier... clone your whole current Raspbian Stretch microSD to a HDD/SSD. dont check the new partition UUID"

To do this what do I do if I have no spare HDD will a USB stick work?
I have a USB stick but the pi will not mount it pi is looking for EXT4 format and the stick is in NTFS.
I have tried FAT32 as well.
When I look at the disk it has a "boot" partition (SanDisk Cruzer Switch) as it is the only one I have at present I cannot use copier to put it on it.

This is the error I am getting.
"Error mounting system-managed device /dev/sdb2: Command-line `mount "/"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
missing codepage or helper program, or other error"

Funny thing was that it worked yesterday with files on it but this morning with it empty it won't, I put a file on it and still won't work.
Would it be OK for me to remove the boot partition on it or just get another one?.

LTolledo
Posts: 289
Joined: Sat Mar 17, 2018 7:29 am

Re: Move Pi home from SD card to a HDD

Sat Jul 28, 2018 11:57 pm

GAP wrote: I have a USB stick but the pi will not mount it pi is looking for EXT4 format and the stick is in NTFS.
I have tried FAT32 as well.
When I look at the disk it has a "boot" partition (SanDisk Cruzer Switch) as it is the only one I have at present I cannot use copier to put it on it.

This is the error I am getting.
"Error mounting system-managed device /dev/sdb2: Command-line `mount "/"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
missing codepage or helper program, or other error"

Funny thing was that it worked yesterday with files on it but this morning with it empty it won't, I put a file on it and still won't work.
Would it be OK for me to remove the boot partition on it or just get another one?.
That's odd....

This is what I just did right now (am using the HDDPi system I installed yesterday)

1. Popped a 16GB USB stick in win10 pc
2. Deleted all partitions on the USB stick. So now I have an unformatted USB stick
3. Plugged the unformatted 16GB USB stick to an already running RPi3B+ (HDDPi)
4. Selected SD Card Copier in the menu items (Accessories -- SD Card Copier)
5. In the SD Card Copier window Copy From Device [HDD], Copy to Device [USB Stick]
6. Did not check the [ ] New Partition UUID
7. Click on [Start] button

Even though the USB stick is unformatted, the SD card copier proceeded with the cloning process.
Inserting a FAT32 or NTFS formatted USB disk will work the same. Stretch will just pop up a window "Removable medium is inserted"
SD Card Copier will format the device to accommodate the cloned system.

Then I shut down RPi3B+, removed USB power and USB cable for USB HDD. (Now I only have the USB stick and the keyboard/mouse dongle connected to the USB ports)
Powered up the RPi3B+ and let it boot... and it booted successfully on the cloned USB stick

Could it be that you did not remove the original system from which the system was cloned from?
Well I actually tried this, the original HDD and the cloned USB stick both plugged to the USB port. RPi3B+ booted from USB stick.

Code: Select all

[email protected]:~ $ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    1  14.5G  0 disk 
├─sda1   8:1    1  43.2M  0 part /boot
└─sda2   8:2    1  14.4G  0 part /
sdb      8:16   0 232.9G  0 disk 
├─sdb1   8:17   0  43.2M  0 part 
└─sdb2   8:18   0 232.9G  0 part 
"Don't come to me with 'issues' for I don't know how to deal with those...
Come to me with 'problems' and I'll help you find solutions"

Return to “General discussion”

Who is online

Users browsing this forum: GAP, jbudd, laurent, RaTTuS and 64 guests