ladius
Posts: 14
Joined: Sun Mar 15, 2015 4:18 pm

Problems when migrating system to USB Drive

Wed Jan 18, 2017 1:28 am

Since I found a 256mb microsd around, I decided it was time to migrate my Raspbian install to my USB Drive, but I'm having issues with it.

My setup is a Raspberry Pi 2 with a 64GB SD and a 300GB drive attached, sharing it's contents via a SMB share.

I start by shrinking the only (NTFS) partition in the USB disk and then moving the ext4 partition from my main 64GB SD card to the USB disk. I then edit the fstab file, delete the /dev/mmcblk0p2 mounting on / and switch it for my new partition (the ext4 I copied from the 64GB SD card to the USB disk)

Then I prepared the 256mb SD with the boot partition and edited the cmdline.txt file so that the part where it says "root=" points to the ext4 partition I copied from the 64GB SD to the USB disk.

Now this is where the problems start. When I boot the Pi, it boots correctly from my ext4 partition copied from the 64GB SD to the USB Disk, but it simply doesn't read my modified /etc/network/interfaces file and instead fetches an IP address from DHCP (it's configured to a static address). Any clues on what's happening here? Did I do anything wrong?

(Besides this, my Samba share obviously doesn't work anymore. Is there any tutorial that points me in the right direction regarding changing the target for the share, or should I configure my share all over again?)

User avatar
rpdom
Posts: 17409
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Problems when migrating system to USB Drive

Wed Jan 18, 2017 6:10 am

ladius wrote:When I boot the Pi, it boots correctly from my ext4 partition copied from the 64GB SD to the USB Disk, but it simply doesn't read my modified /etc/network/interfaces file and instead fetches an IP address from DHCP (it's configured to a static address). Any clues on what's happening here? Did I do anything wrong?
At the top of the /etc/network/interfaces file there is a message

Code: Select all

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
This means that static IP addresses are not controlled by this file, but in /etc/dhcpcd.conf instead.

ladius
Posts: 14
Joined: Sun Mar 15, 2015 4:18 pm

Re: Problems when migrating system to USB Drive

Wed Jan 18, 2017 3:57 pm

rpdom wrote:
ladius wrote:When I boot the Pi, it boots correctly from my ext4 partition copied from the 64GB SD to the USB Disk, but it simply doesn't read my modified /etc/network/interfaces file and instead fetches an IP address from DHCP (it's configured to a static address). Any clues on what's happening here? Did I do anything wrong?
At the top of the /etc/network/interfaces file there is a message

Code: Select all

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
This means that static IP addresses are not controlled by this file, but in /etc/dhcpcd.conf instead.
Thanks for the reply. I have no such message neither a dhcpcd.conf file. If I put back my old SD everything works as it always has and I always used the interfaces file to set up a static IP.

Still looking as to what's causing trouble on my data migration.

Return to “Troubleshooting”