Temar Posted January 23, 2017 Posted January 23, 2017 I have a cubietruck board and successfully moved my Armbian installation from my microSD card to my SSD. I would like to clean up the microSD card now and shrink it to a smaller size, so I can move the content to a smaller card. What do I actually need on that card to be able to boot to SSD? Just the '/boot' folder or does the boot loader need any other data to do its magic?
Temar Posted January 23, 2017 Author Posted January 23, 2017 That explains why it does not work :-) $ dpkg -l '*u-boot*' | grep ii ii linux-u-boot-cubietruck-next 5.24 armhf Uboot loader 2016.11 ii u-boot-tools 2014.10+dfsg1-5 armhf companion tools for Das U-Boot bootloader $ dpkg -L linux-u-boot-cubietruck-next /. /usr /usr/lib /usr/lib/linux-u-boot-next-cubietruck_5.24_armhf /usr/lib/linux-u-boot-next-cubietruck_5.24_armhf/u-boot-sunxi-with-spl.bin /usr/lib/u-boot /usr/lib/u-boot/platform_install.sh ^^ Are you talking about that u-boot loader or do I have to install it somwehere to the new SD card? Like GRUB or LILO? EDIT: Found http://linux-sunxi.org/Bootable_SD_cardwhich describes how to write the bootloader to the SD. I tried to clone the SD card by copying the first MB and then reseting the partition table, but that didn't work either: $ dd if=/dev/sdf of=/dev/sdg bs=1M count=1 $ dd if=/dev/zero of=/dev/sdg bs=512 count=1 $ dd if=/dev/sdf of=/dev/sdg bs=446 count=1 $ parted /dev/sdg (parted) mklabel msdos (parted) mkpart primary ext4 1048576B 100% $ mke2fs -L ROOT -t ext4 /dev/sdg1 $ mount /dev/sdg1 /mnt/sdg1 $ cp -a /mnt/sdf1/boot /mnt/sdg1/ $ umount /mnt/sdg1 Will try the proper way from the homepage tomorrow.
Temar Posted January 24, 2017 Author Posted January 24, 2017 Hmm, I can't seem to get this to work, my cubietruck just won't boot. Usually the green light flashes a few seconds after powering it up, but with my new card it does not. Here is what I did, with /dev/sdg being the SD card I'm trying to prepare: ## cleanup SD card $ dd if=/dev/zero of=/dev/sdg bs=1M count=1 ## write u-boot $ dd if=/usr/lib/linux-u-boot-next-cubietruck_5.24_armhf/u-boot-sunxi-with-spl.bin of=/dev/sdg bs=1024 seek=8 ## reread partition table $ sfdisk -R /dev/sdg ## create maximum size Linux partition 1 $ cat <<EOT | sfdisk -L --in-order -uM /dev/sdg 1,,L EOT ## format partition $ mke2fs -L ROOT -t ext4 /dev/sdg1 ## mount and copy data $ mount /dev/sdg1 /mnt $ cp -a /boot /mnt/ $ sync $ umount /mnt Any ideas what I'm doing wrong here?
Ford Prefect Posted January 24, 2017 Posted January 24, 2017 Hi Am I right in assuming that in that configuration after boot it would be possible to remove the boot SD card to use the interface for other purpose ? I am thinking of moving armbian to an usb2 hard drive.
Temar Posted January 24, 2017 Author Posted January 24, 2017 Yes, you can unmount and remove the card. However, you will no longer have the contents of the /boot directory available. When updating your system or installing a new kernel you have to insert and mount the card again or you will get problems.
Ford Prefect Posted January 24, 2017 Posted January 24, 2017 Thanks In fact the card will be in most of the time it is so easy to loose them when not in use
Recommended Posts