Solved: Clone SD to larger SD
|
11th Jan, 2019, 11:08 PM
Post: #1
|
|||
|
|||
Clone SD to larger SD
Due to size constraints I've purchased a larger SD card than I currently use, and am hoping to simply copy the full contents of the SD card to my new larger SD card. I've read the wiki and forum and found a few different options (use dd, win32diskimager, xbian-config) but am a bit confused as to which one is suitable for me.
If I load the SD into my linux laptop I can see two drives, xbian and xbianboot. If I load the SD into windows it shows as multiple drives all unreadable except for xbianboot. Would the easiest way be to run win32diskimager and copy the readable drive and write this to the new SD? I've read that win32diskimager should copy the full SD contents even though multiple drives are shown, and that xbian will resize the partition on startup. So this seems like the best option? Thanks in advance. |
|||
12th Jan, 2019, 12:58 AM
Post: #2
|
|||
|
|||
RE: Clone SD to larger SD
Xbian has it's own helpful copier built in!
If you type xbian-config in a shell window or via ssh, you will see options for backup and copying. One option is to copy entire system to usb. You can also use win32diskimager, I have used this in the past without issues. So it's up to you. Keep your original copy until you know the new image is working OK. Also note that windows will not be able to display the linux partitions on the SD card and that is why there is a difference in what you see between that and linux. Note that whichever method you choose you MUST copy all partitions on the SD card to the new one. It should then resize the card on first boot for the bigger space available. |
|||
12th Jan, 2019, 02:12 AM
Post: #3
|
|||
|
|||
RE: Clone SD to larger SD
The best way to do it is (as Skywatch already told):
1) mount a share to your windows box 2) run sudo xbian-config, select 6) XBian copier 3) change destination to file:/<ThePathYouMounted>/backup.img. This makes a full backup of your sd-card 4) Now you can flash your image to new sd-card with the disk imager of your choice 5) Plug this card into your Pi and boot from it. Resizing root and creating swap will be done on the first boot automatically |
|||
16th Jan, 2019, 02:29 AM
Post: #4
|
|||
|
|||
RE: Clone SD to larger SD
Thank you for the quick help! I've done as you instructed and all works fine, except that the filesystem doesn't seem to have resized. I did try to do the config -> settings -> system -> resize SD but it said the functionality has been disabled.
using df -h and btrfs filesystem df / show the size of the old card (32gb) instead of the new size (128gb) Data, single: total=29.04GiB, used=1.35GiB System, single: total=4.00MiB, used=16.00KiB Metadata, single: total=376.00MiB, used=59.20MiB GlobalReserve, single: total=16.00MiB, used=0.00B |
|||
16th Jan, 2019, 03:37 AM
Post: #5
|
|||
|
|||
RE: Clone SD to larger SD
Tell me, what exactly did you do?
Resizing will be done in the initramfs routines, so if not enabled, you have to enable initramfs Pls show me output of Terminal sudo fdisk -l /dev/mmcblk0 |
|||
16th Jan, 2019, 04:28 AM
Post: #6
|
|||
|
|||
RE: Clone SD to larger SD
I turned off the raspberry, inserted the old SD into my windows laptop and used win32diskimager to create a copy of the SD, and saved this .img to my laptop. I then inserted the new SD card and used win32diskimager to clone this .img onto the new SD. Everything boots fine and it works okay.
I used win32diskimager as I was having trouble mounting drives on the raspberry. Terminal xbian@xbian ~ $ sudo fdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 119.1 GiB, 127865454592 bytes, 249737216 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xd66fd072 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 * 2048 141311 139264 68M b W95 FAT32 /dev/mmcblk0p2 141312 61832191 61690880 29.4G 83 Linux /dev/mmcblk0p3 61833216 62333951 500736 244.5M 82 Linux swap / Solaris |
|||
17th Jan, 2019, 03:48 AM
Post: #7
|
|||
|
|||
RE: Clone SD to larger SD
So it does not wondering why you still have 32GB. You did not that what we described, you just made a 1:1 copy of your 32GB sd-card
So, you can do following steps now: 1) you have to remove partition 3 (this is the swap partition) 1.1) run sudo swapoff -a 1.2) run sudo fdisk /dev/mmcblk0 and delete partition 3. Don't forget to save changes by running 'w' command 2) make sure that initramfs is enabled, this can be set in Kodis XBian-config GUI, Category System 3) reboot While system starts again, root partition will be enlarged and new swap partition will be created |
|||
17th Jan, 2019, 05:52 AM
Post: #8
|
|||
|
|||
RE: Clone SD to larger SD
Thank you so much, all is working now with the correct size. My apologies for not following instructions, I just couldn't get my windows mount working correctly on the raspberry.
Thanks as always for such good software and amazing support! |
|||
17th Jan, 2019, 05:54 AM
Post: #9
|
|||
|
|||
RE: Clone SD to larger SD
Thanks for your response, set this thread as solved
|
|||
10th Jan, 2020, 09:49 PM
Post: #10
|
|||
|
|||
RE: Clone SD to larger SD
I also faced the same problem. Then I thought it would be solved after updating the system. But when I tried to insert Sd card at that time <LINK_REMOVED_BY_MODERATOR> pop-up message shown on my system screen.
|
|||
10th Jan, 2020, 10:28 PM
(This post was last modified: 12th Jan, 2020 10:10 AM by deHakkelaar.)
Post: #11
|
|||
|
|||
RE: Clone SD to larger SD
(10th Jan, 2020 09:49 PM)astonroper Wrote: I also faced the same problem. Then I thought it would be solved after updating the system. But when I tried to insert Sd card at that time <LINK_REMOVED_BY_MODERATOR> pop-up message shown on my system screen. In case you haven't noticed, XBian definitely does not run on Windows and there is no such error number |
|||
12th Jan, 2020, 10:12 AM
Post: #12
|
|||
|
|||
RE: Clone SD to larger SD
(10th Jan, 2020 09:49 PM)astonroper Wrote: I also faced the same problem. Then I thought it would be solved after updating the system. But when I tried to insert Sd card at that time <LINK_REMOVED_BY_MODERATOR> pop-up message shown on my system screen. We seem to have attrackted some spammers. There are only 10 types of people in the world: those who understand binary, and those who don't |
|||
« Next Oldest | Next Newest »
|