Jump to content

Recommended Posts

Posted (edited)

Hi! I am trying to install Armbian_5.75_Cubietruck_Ubuntu_bionic_next_4.19.20 to sata ssd (Boot from SD system on SATA from sata-nand-install) to my cubietruck but it still boot from sd-card.

It seems like all nessesary files copyed to sata but there no changes in boot config to boot system from sata.

After roboot i see the next and there no my 40 GB ssd:

df -h
 

Filesystem      Size  Used Avail Use% Mounted on
udev            938M     0  938M   0% /dev
tmpfs           202M   11M  191M   6% /run
/dev/mmcblk0p1  7.2G  1.8G  5.3G  26% /
tmpfs          1006M     0 1006M   0% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs          1006M     0 1006M   0% /sys/fs/cgroup
tmpfs          1006M  108K 1006M   1% /tmp
/dev/zram0       49M  3.5M   42M   8% /var/log
tmpfs           202M  8.0K  202M   1% /run/user/1000
fdisk -l
Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mmcblk0: 7.4 GiB, 7948206080 bytes, 15523840 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: 0x27105329

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       8192 15213343 15205152  7.3G 83 Linux


Disk /dev/sda: 37.3 GiB, 40020664320 bytes, 78165360 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: 0x1e31a2b4

Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1        2048 78165359 78163312 37.3G 83 Linux


Disk /dev/zram0: 50 MiB, 52428800 bytes, 12800 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/zram1: 502.8 MiB, 527228928 bytes, 128718 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/zram2: 502.8 MiB, 527228928 bytes, 128718 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

What i have to do to boot from sd-card system from sata?

 

Edited by maxmen77
attach additional info
Posted

I just find /var/log/nand-sata-install.log and there was the next:

Sat Apr  6 12:25:50 UTC 2019: Start nand-sata-install.

Old UUID:  /dev/mmcblk0p1
SD UUID:   UUID=ceb0bbd5-418c-4e46-b120-5ebc4d0e5824
SATA UUID: UUID=ff343df0-6da4-4f2c-a0ab-882bffbbedb6
eMMC UUID:
Boot: $1
Root: $2 /dev/sda1 ext4
Usage: 1824
Dest: 35338

/etc/fstab:
UUID=ceb0bbd5-418c-4e46-b120-5ebc4d0e5824 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1
tmpfs /tmp tmpfs defaults,nosuid 0 0

/etc/mtab:
/dev/mmcblk0p1 / ext4 rw,noatime,nodiratime,errors=remount-ro,commit=600 0 0
/dev/mmcblk0p1 /var/log.hdd ext4 rw,noatime,nodiratime,errors=remount-ro,commit=600 0 0
/dev/sda1 /mnt/nand-sata-install.q6FEmR/rootfs ext4 rw,relatime 0 0
/dev/zram0 /var/log ext4 rw,relatime,block_validity,discard,delalloc,nojournal_checksum,barrier,user_xattr,acl 0 0

Files currently open for writing:
dhclient   926             root    4w   REG  179,1     1113  35899 /var/lib/NetworkManager/dhclient-01c1d280-be03-3996-8781-751811239376-eth0.lease
sh        1333         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xfce4-ses 1556         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xfwm4     1689         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xfce4-pan 1698         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
Thunar    1701         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xfdesktop 1705         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
pasystray 1709         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
blueman-a 1712         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
polkit-gn 1716         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
applet.py 1721         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xscreensa 1724         grimakon    6w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
nm-applet 1727         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xfsetting 1744         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
pulseaudi 1754         grimakon   11u   REG  179,1    12288 186667 /home/grimakon/.config/pulse/f0bef15ed3214c23bc967933014784df-device-volumes.tdb
pulseaudi 1754         grimakon   12u   REG  179,1      696 186668 /home/grimakon/.config/pulse/f0bef15ed3214c23bc967933014784df-stream-volumes.tdb
pulseaudi 1754         grimakon   13u   REG  179,1    16384 186669 /home/grimakon/.config/pulse/f0bef15ed3214c23bc967933014784df-card-database.tdb
panel-6-s 1855         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
panel-2-a 1856         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors

Trying to stop running services to minimize open files:
Stopping cron.service

Checking again for open files:
sh        1333         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xfce4-ses 1556         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xfwm4     1689         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xfce4-pan 1698         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
Thunar    1701         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xfdesktop 1705         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
pasystray 1709         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
blueman-a 1712         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
polkit-gn 1716         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
applet.py 1721         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xscreensa 1724         grimakon    6w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
nm-applet 1727         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
xfsetting 1744         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
pulseaudi 1754         grimakon   11u   REG  179,1    12288 186667 /home/grimakon/.config/pulse/f0bef15ed3214c23bc967933014784df-device-volumes.tdb
pulseaudi 1754         grimakon   12u   REG  179,1      696 186668 /home/grimakon/.config/pulse/f0bef15ed3214c23bc967933014784df-stream-volumes.tdb
pulseaudi 1754         grimakon   13u   REG  179,1    16384 186669 /home/grimakon/.config/pulse/f0bef15ed3214c23bc967933014784df-card-database.tdb
panel-6-s 1855         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors
panel-2-a 1856         grimakon    2w   REG  179,1     8117 186649 /home/grimakon/.xsession-errors

Copying 114841 files to /dev/sda1. Finishing transfer to disk, boot from SD/eMMC

Checking again for open files:
sh        1333         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
xfce4-ses 1556         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
xfwm4     1689         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
xfce4-pan 1698         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
Thunar    1701         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
xfdesktop 1705         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
pasystray 1709         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
blueman-a 1712         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
polkit-gn 1716         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
applet.py 1721         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
xscreensa 1724         grimakon    6w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
nm-applet 1727         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
xfsetting 1744         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
pulseaudi 1754         grimakon   11u   REG  179,1    12288 186667 /home/grimakon/.config/pulse/f0bef15ed3214c23bc967933014784df-device-volumes.tdb
pulseaudi 1754         grimakon   12u   REG  179,1      696 186668 /home/grimakon/.config/pulse/f0bef15ed3214c23bc967933014784df-stream-volumes.tdb
pulseaudi 1754         grimakon   13u   REG  179,1    16384 186669 /home/grimakon/.config/pulse/f0bef15ed3214c23bc967933014784df-card-database.tdb
panel-6-s 1855         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
panel-2-a 1856         grimakon    2w   REG  179,1     9722 186649 /home/grimakon/.xsession-errors
dhclient  2796             root    4w   REG  179,1      742  35899 /var/lib/NetworkManager/dhclient-01c1d280-be03-3996-8781-751811239376-eth0.lease
Sat Apr  6 12:30:52 UTC 2019: Finished
Apr  6 13:06:18 UTC 2019: Start nand-sata-install.
Sat Apr  6 13:44:39 UTC 2019: Start nand-sata-install.
Sat Apr  6 13:46:15 UTC 2019: Start nand-sata-install.

And i checked the satauuid in the /boot/armbianEnv.txt and there was correct SATAUUID. Is it normal that "boot: $1" is clear?

Posted

I checked mounted sata disk after nand-sata-install script. /media/MyUSERNAME/New Volume/boot folder and it was empty. There no files at all. It seems like nand-sata-install script did not copyed there nessesary files. Or there must be no files? Does somebody explain what i have to do to boot armbian bootloader from sd-card and system boot from  sata?

It seems like nand-sata-install script in not working.

Posted
17 minutes ago, maxmen77 said:

It seems like nand-sata-install script in not working.


No, script works just fine but it is not fully bullet proof for system changes - that would require a lot more work.

 

1. Make sure your drive is not mounted

2. Make sure you haven't alter /boot/armbianEnv.txt

3. Run the script and wait few minutes to finish.

Posted
1 hour ago, maxmen77 said:

Does somebody explain what i have to do to boot armbian bootloader from sd-card and system boot from  sata?

Let explain you something ...

First, the SoC is searching for a U-Boot, which can be either on SDCard, on eMMC or on SPI-NOR Flash.

So, it can not reside on a SATA or USB drive. But the OS rootfs can.

The "nand-sata-install" will copy the /boot directory only in case you are installing on eMMC, since U-Boot can reside there.

In case of SATA or USB drive, it will leave the /boot on the SDCard since it is where the U-Boot will still be loaded.

But as soon as the kernel is mounting rootfs, it sees the /etc/stab entries and the /boot of the SDCard will be mounted on this empty boot folder of the rootfs, so it will then be visible.

 

In case you have an SPI-NOR Flash on your board, and you don't wish to boot from SDCard anymore, yes, you will have to copy /boot folder to the empty /boot of the rootfs manually and remove the /etc/fstab entries that are not needed anymore.

 

Posted

Igor, thank you.

1. My SSD drive was not mounted when i start the script. After script ask me to reboot system was rebooted and then i have to mount the ssd maually to /mnt/ssd and i check it -  there was copyed by script files:

# ls -l /mnt/ssd
total 80
drwxr-xr-x   2 root root 4096 Apr  6 12:06 bin
drwxr-xr-x   2 root root 4096 Apr  9 17:32 boot
drwxr-xr-x   2 root root 4096 Apr  9 17:54 dev
drwxr-xr-x 126 root root 4096 Apr  9 18:01 etc
drwxr-xr-x   3 root root 4096 Apr  6 10:28 home
drwxr-xr-x  18 root root 4096 Feb  9 20:16 lib
drwx------   2 root root 4096 Feb  9 20:20 lost+found
drwxr-xr-x   5 root root 4096 Apr  9 18:01 media
drwxr-xr-x   2 root root 4096 Apr  9 17:56 mnt
drwxr-xr-x   2 root root 4096 Feb  7 15:58 opt
dr-xr-xr-x   2 root root 4096 Jan  1  1970 proc
drwx------  16 root root 4096 Apr  9 17:42 root
drwxr-xr-x   2 root root 4096 Apr  9 17:58 run
drwxr-xr-x   2 root root 4096 Apr  6 12:07 sbin
drwxrwxr-x   2 root root 4096 Feb  9 20:16 selinux
drwxr-xr-x   2 root root 4096 Feb  7 15:58 srv
dr-xr-xr-x   2 root root 4096 Jan  1  1970 sys
drwxrwxrwt   2 root root 4096 Apr  9 18:00 tmp
drwxr-xr-x  10 root root 4096 Feb  7 15:58 usr
drwxr-xr-x  13 root root 4096 Apr  6 11:27 var

2. But the /boot folder on the ssd was empty - may be it is the reason of these troubles?

# ls -l /mnt/ssd/boot
total 0

# cat /boot/armbianEnv.txt from sd-card

# cat /boot/armbianEnv.txt 
/var/log.hdd/dpkg.log {
	monthly
	rotate 12
	compress
	delaycompress
	missingok
	no
rootdev=UUID=b00453d0-4973-4b88-ad30-ebf605958690
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

The last part of logfile nand-sata-install.log seems like there right UUID=b00453d0-4973-4b88-ad30-ebf605958690 in the /boot/armbianEnv.txt of SD-card.

Copying 114912 files to /dev/sda2. Finishing transfer to disk, boot from SD/eMMC
Put UUID=b00453d0-4973-4b88-ad30-ebf605958690 to /boot/boot.cmd
Put UUID=b00453d0-4973-4b88-ad30-ebf605958690 to /boot/boot.ini

I run the script right now and there the same result again - no result.

I try to copy files manually from /boot sd card to /boot ssd but there no result also.

What i do wrong?

 

 

Posted

Martynayotte, i check /etc/fstab on the sd-card and on the ssd:

SSD:

cat /mnt/ssd/etc/fstab
# <file system>					<mount point>	<type>	<options>							<dump>	<pass>
tmpfs						/tmp		tmpfs	defaults,nosuid							0	0
UUID=ceb0bbd5-418c-4e46-b120-5ebc4d0e5824	/media/mmcboot	ext4    defaults,noatime,nodiratime,commit=600,errors=remount-ro,x-gvfs-hide	0	1
/media/mmcboot/boot  				/boot		none	bind								0       0
UUID=f135e85e-d58b-48e4-a704-8c5f61ff1849	/		ext4	defaults,noatime,nodiratime,commit=600,errors=remount-ro,x-gvfs-hide	0	1

SD-card:

# cat /etc/fstab
UUID=ceb0bbd5-418c-4e46-b120-5ebc4d0e5824 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1
tmpfs /tmp tmpfs defaults,nosuid 0 0

Should i replace /etc/fstab on the sd-card to fstab from the ssd?

Posted
1 hour ago, maxmen77 said:

cat /boot/armbianEnv.txt from sd-card


This is clearly wrong content. It looks like some sort of data corruption, perhaps SD card is failing ...

 

Good file looks like this:

cat /boot/armbianEnv.txt 
verbosity=1
console=both
overlay_prefix=sun50i-h5
overlays=usbhost2 usbhost3
rootdev=UUID=1df28acb-e387-46fd-a400-f6f99e8b9b44
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

Type

blkid

on SD card booted system and when your SSD is attached. Or better (what should be here from start):

armbianmonitor -u

 

Posted

Igor, thank you!

# blkid
/dev/mmcblk0p1: UUID="ceb0bbd5-418c-4e46-b120-5ebc4d0e5824" TYPE="ext4" PARTUUID="27105329-01"
/dev/sda2: UUID="f135e85e-d58b-48e4-a704-8c5f61ff1849" TYPE="ext4" PARTUUID="175eabfb-238c-5042-b941-fae162ae83ec"
/dev/zram0: LABEL="log2ram" UUID="32c412e4-80d5-4536-b3d5-ad087a516143" TYPE="ext4"
/dev/mmcblk0: PTUUID="27105329" PTTYPE="dos"
/dev/sda1: PARTUUID="42037aed-ed0e-a147-9f5e-618079d27807"
/dev/zram1: UUID="5e585ab9-0a82-4eb5-8519-59693cc88250" TYPE="swap"
/dev/zram2: UUID="0634003a-8ca5-43b3-9471-37231b6cf5a5" TYPE="swap"

 

armbianmonitor -u link

 

Igor, i solved the problem with your help, thank you! The problem was in the some trash in the file /boot/armbianEnv.txt  (trash i dont know where it is from /var/log.hdd/dpkg.log { monthly rotate 12 compress delaycompress missingok no). I remove it and replace to cat /boot/armbianEnv.txt  you posted and now it was reboot and working now! It was booted from SSD!

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines