Jump to content

nand-sata-install script


zonegrise

Recommended Posts

Yes, it should be ... if not, than they came with apt-get update / upgrade. They are now in standard system dir and not in root dir (which you might find in some outdated docs) so you just type:

nand-sata-install
Link to comment
Share on other sites

For the record: it is not a good idea to have the SD-card unmounted, when doing an armbian-upgrade. Because during an armbian-upgrade there need to be files written in the folder /boot on the SD-card.

Link to comment
Share on other sites

The SATA disk root was moved to with the nand-sata-install script appears to have problems. Is there a way to revert to the original root on the SD card

 

EDIT  Nevermind I just found the answer on Sunxi (change the root mount point in boot.cmd then "sudo mkimage -C none -A arm -T script -d boot.cmd boot.scr")

Link to comment
Share on other sites

After moving the system from uSD to emmc on OPi+2E and rebooting, I don't have any access to the uSD card anymore. "fdisk -l" and "blkid -c /dev/null" doesn't show anything. Nothing in journal and syslog.

Reinserting and reformation (on other PC) doesn't help.

Any clues?

 

Thanks.

Link to comment
Share on other sites

After moving the system from uSD to emmc on OPi+2E and rebooting, I don't have any access to the uSD card anymore. "fdisk -l" and "blkid -c /dev/null" doesn't show anything. Nothing in journal and syslog.

Reinserting and reformation (on other PC) doesn't help.

Any clues?

 

Thanks.

I am experiencing the same. Use image: Armbian_5.14_Orangepiplus_Debian_jessie_3.4.112_desktop.

 

Could you please let me know if you found anything? Cheers

Link to comment
Share on other sites

This is completly off topic since it started for Cubox and you are asking about NAND on Allwinner. I assume you want to use it on Cubietruck ? Well, it's not reliable so it's disabled in DTB https://github.com/igorpecovnik/lib/blob/master/patch/kernel/sunxi-next/add-nand-to-cubietruck.patch.disabled

 

For Allwinner A20 better upgrade to 4.9.9 ... there is no benefit of using kernel 4.4.x

Link to comment
Share on other sites

I have just build a new Image for my orange pi pc +2e (xenial desktop legacy kernel) and found the nand-sata-install script broken

ek@orangepiplus2e:~$ sudo nand-sata-install
[sudo] Passwort für ek: 
ls: Zugriff auf '/dev/nand*' nicht möglich: Datei oder Verzeichnis nicht gefunden

in fact i wanted to test the armbian-config

Link to comment
Share on other sites

18 hours ago, Da Alchemist said:

ls: Zugriff auf '/dev/nand*' nicht möglich: Datei oder Verzeichnis nicht gefunden

 

This is not a problem but dirty "NAND availability check" :rolleyes: ... BTW: for armbian-config testing you only need to switch to beta repository and issue apt-get update / upgrade.

Link to comment
Share on other sites

BTW: Tried nand-sata-install on a full OMV install and it failed horribly (as expected). Running this script with a lot of services running, having tons of files and databases open can not work. :)

 

As long as we can't execute this from initrd or something like that it should be recommended to do a 'systemctl set-default $simple-target', reboot, run nand-sata-install, reboot and adjust target back.

 

I would also believe adding /var/log to exclude.txt now that log2ram is active might be a good idea?

Link to comment
Share on other sites

41 minutes ago, tkaiser said:

As long as we can't execute this from initrd or something like that it should be recommended to do a 'systemctl set-default $simple-target', reboot, run nand-sata-install, reboot and adjust target back.

 

Or we should check if we can use systemctl isolate?

Quote
isolate NAME

Start the unit specified on the command line and its dependencies and stop all others. If a unit name with no extension is given, an extension of ".target" will be assumed.

This is similar to changing the runlevel in a traditional init system. The isolate command will immediately stop processes that are not enabled in the new unit, possibly including the graphical environment or terminal you are currently using.

Note that this is allowed only on units where AllowIsolate= is enabled. See systemd.unit(5) for details.

 

42 minutes ago, tkaiser said:

I would also believe adding /var/log to exclude.txt now that log2ram is active might be a good idea?

Yes, but we need to make sure that the directory /var/log is created on the target

Link to comment
Share on other sites

1 hour ago, zador.blood.stained said:

Or we should check if we can use systemctl isolate?

This looks interesting! So if I understood correctly we would bundle a 'nand-sata-install-helper' unit that will be called from within the script with 'systemctl isolate' to ensure that as much as services/units stopped before continuing?

 

If so, I doubt I'm able to do this (still systemd noobie) but would suggest that we improve logging of nand-sata-install anyway:

  • Move log away from /tmp/nand-sata-install.log to /var/log and always use append here (so we can add the contents to 'armbianmonitor -u' output to be able to diagnose problems users are running into)
  • Add output from 'lsof / | awk 'NR==1 || $4~/[0-9][uw]/'' twice to this log: before and after so that it's at least documented which files were in a probably inconsistent state while syncing files
Link to comment
Share on other sites

Well, if I understand your point, it means that we cannot make "consistent" online backup anyway ? (Loss of data is annoying, but inconsistency is far more problematic). And if I cannot make backups of my small $15 board without manual heavy procedure, what the use to  install it on nand ?

Link to comment
Share on other sites

3 hours ago, arox said:

Well, if I understand your point, it means that we cannot make "consistent" online backup anyway ?

 

This is not backup but cloning to transfer the installation to another media. The problems are almost the same: open files might be saved in an incosistent state and cause trouble later. That's why we already have 2 rsync runs in nand-sata-install to catch these errors a bit but Zador's suggestion above looks promising: stopping as much daemons (that might have file handles for writing) as possible and then start the routine. The aforementioned check can be used to verify whether such problematic files still exist:

lsof / | awk 'NR==1 || $4~/[0-9][uw]/'

Of course it would be better to have something like Windows' shadow copy service and applications using this API since then we could really 'freeze' the installation before transferring it to somewhere else. But we're on linux here and can not even rely on filesystem snapshots so we have to deal with that crappy situation as best as possible.

 

BTW: others do stuff similar, please compare with -a and -o options here for example: https://www.linux-tips-and-tricks.de/en/backup

Link to comment
Share on other sites

With latest commits nand-sata-install should also be much more reliable when running on a system with typical services installed. See at the end of http://sprunge.us/FGOD

 

Requires the following of course the next few weeks:

wget -O- "https://raw.githubusercontent.com/igorpecovnik/lib/master/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh" >/usr/sbin/nand-sata-install

 

Link to comment
Share on other sites

Hello everyone,

 

I am trying to run the nand-sand-install script in order to boot from SD card and have my filesystem on an SSD card.

I am using this stretch armbian image with nanopi neocore : https://www.armbian.com/nanopi-neo/

What I did is the following :

1) I updated and upgraded the image after booting.

2) I deleted all the partitions that I have on my SSD disk.

3) I created an new partition on the SSD disk.

4) I didn't mount the disk.

5) I used armbian-config to run the nand-sata-install script.

6) The partition is detected and the files are transfered to the SSD disk.

7) After the script is done, I choosed to reboot.

8) After the reboot, I cannot access the nanopi.

 

What I should do? 

My goal is to boot from SD and have my system on the SSD card. So normally I should keep only /boot on SD card and everything else should be on the SSD disk.

 

Thanks in advance for the help.

Link to comment
Share on other sites

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

Important Information

Terms of Use - Privacy Policy - Guidelines