odroid-c2 : root in the hard disk

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

odroid-c2 : root in the hard disk

Postby hatahata50 » Thu May 05, 2016 8:07 am

Hi all .

hard disk is bigger and more tough than sd card .

so
i usualy run root in the hard disk .

i do this in a running machine .


1) attach sata hard disk (via usb-sata converter)


2) shell script

umount /ma1
mount /dev/sda1 /ma1
df
read X
echo $X
cd /ma1
mkdir -p bin etc home lib opt root sbin srv usr var selinux
for x in /bin /etc /home /lib /opt /root /sbin /srv /usr /var /selinux
do rsync -avHx $x/ /ma1$x/
done

cd /ma1
mkdir -p boot dev mnt proc run sys tmp



3) /boot/boot.ini | grep sda1

setenv bootargs "root=/dev/sda1 rootwait rw ${condev} no_console_suspend hdmimode=${m} m_bpp=${m_bpp} vout=${vout} fsck.repair=yes"


4)/ma1/etc/fstab
# # /etc/fstab: static file system information
## <file system> <dir> <type> <options> <dump> <pass>
/dev/sda1 / ext4 errors=remount-ro 0 1
/dev/sda2 none swap sw 0 0


5)reboot



then

df
Filesystem 1K-blocks Used Available Use% Mounted on
dev 753648 0 753648 0% /dev
run 880004 372 879632 1% /run
/dev/sda1 76249132 4457444 67895320 7% /
tmpfs 880004 0 880004 0% /dev/shm
tmpfs 880004 0 880004 0% /sys/fs/cgroup
tmpfs 880004 0 880004 0% /tmp
tmpfs 176004 0 176004 0% /run/user/1001


if there are something wrong , please teach me .
------------------
by tuyosi
Last edited by hatahata50 on Sun May 08, 2016 9:19 pm, edited 1 time in total.
hatahata50
 
Posts: 47
Joined: Tue Dec 29, 2015 6:04 am

Re: root in the hard disk / odoroid-c2

Postby hatahata50 » Sat May 07, 2016 6:27 am

about cloning hard disk drive

at the end of console message , insert usb HDD ( when GUI has booted , odroid-c2 become no response :x )


clone-rsync-2-HDD.bat
ntpd -s
date
echo '--------------------'
umount /mb1
mount /dev/sdb1 /mb1
df
echo '--------------------'
read X
echo $X
cd /mb1
mkdir -p bin etc home lib opt root sbin srv usr var selinux
for x in /bin /etc /home /lib /opt /root /sbin /srv /usr /var /selinux
do
rsync -avHx $x/ /mb1$x/
done
cd /mb1
mkdir -p boot dev mnt proc run sys tmp





now


4GB sdcard ; odroid-c2 ------- 250GB USB hard disk drive

4GB sdcard is for booting .
250GB USB hard disk drive is for root .


df
Filesystem 1K-blocks Used Available Use% Mounted on
dev 753652 0 753652 0% /dev
run 880008 452 879556 1% /run
/dev/sda1 234040372 61896540 160232144 28% /
tmpfs 880008 136 879872 1% /dev/shm
tmpfs 880008 0 880008 0% /sys/fs/cgroup
tmpfs 880008 4 880004 1% /tmp
tmpfs 176004 8 175996 1% /run/user/1001


fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 3.7 GiB, 3951034368 bytes, 7716864 sectors
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 7716863 7714816 3.7G 83 Linux

−−−−−−−−−−−−−−−
http://odroid-akita.blogspot.jp/2016/05 ... linux.html is my page .
hatahata50
 
Posts: 47
Joined: Tue Dec 29, 2015 6:04 am


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 11 guests