[solved] change mmcblk0p2 for sda1 [root is hard disk]

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

[solved] change mmcblk0p2 for sda1 [root is hard disk]

Postby hatahata50 » Tue Dec 29, 2015 6:15 am

hi all .

i begin to start raspberry yestarday .

i clone /dev/mmcblk0p2 to /dev/sdc1 (32G USB memory) .

surely raspberry can boot , but /dev/root is too small .

how to expand /dev/sda1 (32G USB memory).

perhaps this is FAQ , please show me the URL to solve this .
when this can be made , i use sata HDD with usb-sata converter .

---
# cat /mp1/cmdline.txt (/dev/mmcblk0p1)
root=/dev/sda1 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
===================================================
regards
Last edited by hatahata50 on Fri Jan 01, 2016 3:34 am, edited 4 times in total.
hatahata50
 
Posts: 47
Joined: Tue Dec 29, 2015 6:04 am

Re: how to expand USB memory (boot from SD , run at USB)

Postby moonman » Tue Dec 29, 2015 7:28 am

You can use smaller card with just fat32 partition that contains the bootloader + kernel.
Copy rootfs from your existing card to the hard drive that is formated as any supported linux fs.
$this->bbcode_second_pass_code('', 'cp -a <src> <dest>')
Lookup PARTUUID of the new rootfs partition on the HDD with 'blkid'
Now use root=PARTUUID=<partuuid> in cmdline.txt
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: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: how to expand USB memory (boot from SD , run at USB)

Postby hatahata50 » Tue Dec 29, 2015 6:54 pm

thanks for kind answer .

i guess i shoud do gdisk for partuuid .
is it right ?
hatahata50
 
Posts: 47
Joined: Tue Dec 29, 2015 6:04 am

Re: how to expand USB memory (boot from SD , run at USB)

Postby moonman » Tue Dec 29, 2015 11:24 pm

Whatever you like. You can use gparted if you want a nice gui.
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: 3387
Joined: Sat Jan 15, 2011 3:36 am

[solved] how to expand USB memory (boot from SD , run at US

Postby hatahata50 » Wed Dec 30, 2015 4:57 am

now , i start at different point .

namely http://raspberry-akita.blogspot.jp/2015 ... n-usb.html .
(my writing)

in case of arch ,
boot arch-raspberry by 4GB SD card ,
and
mount /dev/sda1 /ma1 <---hard disk drive

cd /ma1
cp --archive /bin /etc /home /lib /opt /root /run /sbin /srv /tmp /usr /var ./
mkdir -p boot dev sys mnt proc


and
rewite /boot/cmdline.txt
root=/dev/sda1 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop


rewrite /ma1/etc/fstab
/dev/mmcblk0p1 /boot vfat defaults 0 0
/dev/sda2 none swap sw 0 0


raspberry----[usb-sata converter]-----SATA HDD

now
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 128884388 664212 121650192 1% /
devtmpfs 216908 0 216908 0% /dev
tmpfs 221152 0 221152 0% /dev/shm
tmpfs 221152 372 220780 1% /run
tmpfs 221152 0 221152 0% /sys/fs/cgroup
tmpfs 221152 0 221152 0% /tmp
/dev/mmcblk0p1 102182 17558 84624 18% /boot
tmpfs 44232 0 44232 0% /run/user/1001
128GB


top - 04:54:56 up 15 min, 1 user, load average: 0.00, 0.05, 0.06
Tasks: 75 total, 1 running, 74 sleeping, 0 stopped, 0 zombie
%Cpu0 : 1.3/2.6 4[|| ]
GiB Mem : 7.8/0.422 [ ]
GiB Swap: 0.0/3.000 [ ]
swap is 3G


this result is very happy for me , becaue raspberry can go over 1TB .

and then i will exchange 4GB SD for 512MB SD .
this step is perhaps easy because of my expirience at minibian-raspberry .

my memo is http://hatahata50.blogspot.jp/2015/12/raspberry-pi-type-b-b-usb.html


/boot is 512MB SD card
/ is 160GB sata Hard Disk (this is impossible by sd card)




Image
---------
regards
tuyosi takesima
hatahata50
 
Posts: 47
Joined: Tue Dec 29, 2015 6:04 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 20 guests