Moving ALARM from flash drive to HD?

Ask questions about Arch Linux ARM. Please search before making a new topic.

Moving ALARM from flash drive to HD?

Postby Waynosan » Mon Mar 02, 2015 8:26 pm

I found a small 2.5" USB HD and I'd like to move my install from the slow 4GB flash drive that I have it installed on now. I looked at the Archlinux disk cloning wiki and it looks like there's a number of different ways to go about this. Any suggestions on which is easiest (cause a noobie least amount of trouble)?... Or am I better off reinstalling from scratch? I already have SAMBA configured and started playing with CUPS so I'd rather go with the first option if possible. Thanks!
Waynosan
 
Posts: 22
Joined: Wed Mar 06, 2013 2:49 pm

Re: Moving ALARM from flash drive to HD?

Postby WarheadsSE » Mon Mar 02, 2015 8:35 pm

It's a matter of rsyncing off, and changing the rootfs (/) mount.

Which device is this on?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Moving ALARM from flash drive to HD?

Postby Waynosan » Tue Mar 03, 2015 2:10 am

$this->bbcode_second_pass_quote('WarheadsSE', 'I')t's a matter of rsyncing off, and changing the rootfs (/) mount.

Which device is this on?


Hi, thanks for the reply.

Right now it's on a SLOW 4GB USB stick that I had. I was planning on putting it on a faster USB drive that I ordered, and received, but I found a 70GB 2.5" HD in my spare parts bin which I can allocate full-time to this task. I think the HD might be better because then I could have a legit swap partition along with ALARM all on the same drive.

ALARM is presently on /dev/sda1

I have a Linux Mint install on one of my boxes so my plan was to clone the drive using this method:
https://wiki.archlinux.org/index.php/Di ... _hard_disk
and then expand the partition so it's 1GB or so short of filling up the HD. The last 1GB of space I would partition as SWAP.
You say rsync route is easier?
Waynosan
 
Posts: 22
Joined: Wed Mar 06, 2013 2:49 pm

Re: Moving ALARM from flash drive to HD?

Postby moonman » Tue Mar 03, 2015 5:43 am

In dorsn't really matter. I've done "cp -a" in the past too as root (not sudo). No bootloader in mbr so dd seems like a waste of time as it will copy even empty blocks
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Moving ALARM from flash drive to HD?

Postby WarheadsSE » Tue Mar 03, 2015 2:55 pm

Which ARM device is this on?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Moving ALARM from flash drive to HD?

Postby Waynosan » Tue Mar 03, 2015 5:24 pm

Pogoplug v2 Pink (ARM v5 Marvell Kirkwood)
Waynosan
 
Posts: 22
Joined: Wed Mar 06, 2013 2:49 pm

Re: Moving ALARM from flash drive to HD?

Postby Waynosan » Thu Mar 05, 2015 12:16 am

OK, I cloned the USB drive onto the HD and so far everything looked good. I created a 2MB swap partition also. I tried to change the rootfs mount using the procedure outlined here:

https://wiki.archlinux.org/index.php/change_root

However I got stuck at the "Using arch-chroot" phase as Linux Mint doesn't have this command....

Guess next I'll try booting the PPv2 back up using the USB drive, then I'll connect the HD, and then follow the steps in the wiki... does that sound correct?
Waynosan
 
Posts: 22
Joined: Wed Mar 06, 2013 2:49 pm

Re: Moving ALARM from flash drive to HD?

Postby moonman » Thu Mar 05, 2015 2:36 am

Those instructions assume you are on x86. All you need to do is create partitions on the new drive whatever way you like. Format first partition (as ext3 with old bootloader or ext4 if you are using new mainline uboot). Then become root (sudo su) and run "cp -a <old root mountpoint> <new root mount point> then run "sync". Umount all drives. Done.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Moving ALARM from flash drive to HD?

Postby Waynosan » Thu Mar 05, 2015 3:29 am

@moonman,
OK, thanks. Tried doing that but pogoplug doesn't seem to want to boot off of the HD and I can't SSH back into it.

Boots OK when I put the USB drive in (and I can SSH in again). Wondering if the HD enclosure might be causing issues...

I'll try this to the new (faster) USB drive that I bought to try to isolate the issue.

To install ALARM I used the procedure (and bootloader) as described here:

http://archlinuxarm.org/platforms/armv5 ... 2-pinkgray

Here's the commands that I ran in case you see an issue with those in the meantime (ran in Linux Mint with both USB and HD attached). UIDs are almost identical since I initially created an image of the USB drive and then wrote that image to the HD drive:

$this->bbcode_second_pass_code('', '
zbyszko@zbyszko-EX58-UD4P ~ $ sudo su
[sudo] password for zbyszko:
zbyszko-EX58-UD4P zbyszko # cp -a /media/zbyszko/b635b2b5-5db7-4139-8a9c-6607532da371/root /media/zbyszko/b635b2b5-5db7-4139-8a9c-6607532da3711/root
zbyszko-EX58-UD4P zbyszko # sync
zbyszko-EX58-UD4P zbyszko # sync
zbyszko-EX58-UD4P zbyszko # umount /media/zbyszko/b635b2b5-5db7-4139-8a9c-6607532da371
zbyszko-EX58-UD4P zbyszko # umount /media/zbyszko/b635b2b5-5db7-4139-8a9c-6607532da3711
')

UPDATE:
cp command (from USB stick to new USB stick) didn't quite work properly... made a directory with the UID of the source disk and then put all the files in there... doing a "cp --help" shows that the -a switch copies files into an archive (which is what it apparently did).

$this->bbcode_second_pass_code('', 'zbyszko-EX58-UD4P arch # cd /media/zbyszko/ALARM
zbyszko-EX58-UD4P ALARM # ls
b635b2b5-5db7-4139-8a9c-6607532da3711 lost+found
zbyszko-EX58-UD4P ALARM # cd b635b2b5-5db7-4139-8a9c-6607532da3711/
zbyszko-EX58-UD4P b635b2b5-5db7-4139-8a9c-6607532da3711 # ls
bin ca-certificates extracted lost+found opt run sys usr
boot dev home media proc sbin tmp var
bsdtar etc lib mnt root srv T_xc3_x9c_x42_xC4_xB0TAK_UEKAE_K_xC3_xB6k_Sertifika_Hizmet_Sa_xC4_x9Flay_xc4_xb1_x63_xc4_xb1s_xc4_x
')
Waynosan
 
Posts: 22
Joined: Wed Mar 06, 2013 2:49 pm

Re: Moving ALARM from flash drive to HD?

Postby Waynosan » Fri Mar 13, 2015 3:48 pm

I confirmed that simply using cp to copy the contents of the original ALARM USB flash drive to another USB flash drive works fine (ALARM loads up and I'm able to SSH into it using the new USB flash drive). However doing the same to a USB HD drive, does not work (I cannot SSH into the pogoplug when I only have the USB HD drive with ALARM connected).

Guessing that the bootloader is looking for a USB flashdrive mount-point and not a USB HD drive?
Waynosan
 
Posts: 22
Joined: Wed Mar 06, 2013 2:49 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 2 guests