Problem pointing boot to hdd
|
Posts: 24
Threads: 3
Joined: Oct 2015
Reputation:
0
[Solved]
Oct 11, 2015, 05:22 PM
(This post was last modified: Dec 13, 2015, 12:48 AM by Mike.)
Hi again  ,
I'm following this guide to make my bpi boot from sd and then pointing to a usb hdd to run the os. Everything goes fine till this point:
Code:
sudo nano /boot/uEnv.txt
[url=http://www.htpcguides.com/move-linux-banana-pi-sata-setup/][/url]
I cannot find this file and go further. Can I get some help?
***
EDIT: SOLUTION FOUND! (thankyou very much Mike!)
I will write down the whole process to help who is stuck in the same situation: follow the guide linked above till before the "rsync" command.
1. Login as root.
2. Copy o.s. on HDD
Code:
rsync -arx --progress / /tmp/sata
3. Make BPI boot from HDD
Code:
mount /dev/mmcblk0p1 /boot
Code:
nano /boot/boot/boot.cmd
edit the file changing:
Code:
setenv bootargs "console=tty1 root=/dev/mmcblk0p1
into
Code:
setenv bootargs "console=tty1 root=/dev/sda1
save and close the "boot.cmd" file;
then type:
Code:
mkimage -C none -A arm -T script -d /boot/boot/boot.cmd /boot/boot/boot.scr
to generate the "boot.scr" file.
4. Change fstab to mount the HDD at startup:
Code:
nano /tmp/sata/etc/fstab
like this:
Code:
/dev/sda1 /ext4 defaults,noatime,nodiratime,data=writeback,commit=600,errors=remount-rw 0 0
save and close.
Then type:
and reboot.
Unfortunately the file system is mounted as "read-only" at reboot, so you have to remount it as a writable one with:
Code:
mount -o remount,rw /dev/sda1 /
note: Cannot find why it happens every time I reboot ( further helps are appreciated) but to avoid this I just edited crontab to run a remount at startup with:
and at the end of the file insert:
Code:
@reboot mount -o remount,rw /dev/sda1 /
save it and exit.
note: you can use the Hard Disk's UUID in fstab and in crontab if you plan to plug other HDDs to the Banana PI and be sure the right one is mounted at startup.
Bum, thats all. Done!
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Oct 11, 2015, 11:36 PM
That guide was made for Bananian. Igor has pointed out that you must use an image without modular SATA port multiplier support in order to boot to anything other than the sd card.
Posts: 24
Threads: 3
Joined: Oct 2015
Reputation:
0
[Solved]
Oct 12, 2015, 12:39 PM
(This post was last modified: Oct 12, 2015, 12:51 PM by murray_00.)
(Oct 11, 2015, 11:36 PM)Mike Wrote: That guide was made for Bananian. Igor has pointed out that you must use an image without modular SATA port multiplier support in order to boot to anything other than the sd card.
Thanks for your reply, Mike. Since I'm pretty new to Banana PI I did't figured out that difference. So do you think it is impossible to have s.o. running from another source rather then SD card using that "media server image"? Otherwise I'll have to flash another image and start again! Gosh, i've been setting everything for days!
I think I'm gonna try with bananian...
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Oct 12, 2015, 03:54 PM
(This post was last modified: Oct 12, 2015, 07:32 PM by Mike.)
This is an issue with uboot and Igor has explained to me how to fix it. Can you test this guide and see if it works for you? Then I can update the guide so others won't have the same issue.
It should be, SSH into Banana Pi, assuming you are a root user
Code:
nano /boot/boot.cmd
Change this part in this line
Code:
setenv bootargs "console=tty1 root=/dev/mmcblk0p1
to
Code:
setenv bootargs "console=tty1 root=/dev/sda1
Then recompile boot.cmd to boot.scr
Code:
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
Also edit your /etc/fstab in the same way
Posts: 24
Threads: 3
Joined: Oct 2015
Reputation:
0
[Solved]
Oct 13, 2015, 08:15 AM
(Oct 12, 2015, 03:54 PM)Mike Wrote: This is an issue with uboot and Igor has explained to me how to fix it. Can you test this guide and see if it works for you? Then I can update the guide so others won't have the same issue.
It should be, SSH into Banana Pi, assuming you are a root user
Code:
nano /boot/boot.cmd
Change this part in this line
Code:
setenv bootargs "console=tty1 root=/dev/mmcblk0p1
to
Code:
setenv bootargs "console=tty1 root=/dev/sda1
Then recompile boot.cmd to boot.scr
Code:
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
Also edit your /etc/fstab in the same way
Thankyou again, I'll try what you suggest as soon as I have time and let you know how it goes.
Posts: 24
Threads: 3
Joined: Oct 2015
Reputation:
0
[Solved]
Oct 13, 2015, 10:49 AM
(This post was last modified: Oct 13, 2015, 10:56 AM by murray_00.)
First of all: you have to do the rsync as a root. Doing as sudo user simply doesn't "generate" the boot.cmd file.
Second: the file boot.cmd is located in
Code:
/boot/boot/boot.cmd
Third: this
Code:
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
must be changed:
Code:
mkimage -C none -A arm -T script -d /boot/boot/boot.cmd /boot/boot/boot.scr
Finally after these modification I managed to do boot os from HD. Thankyou for your precious help Mike!
Actually something went wrong. When I try to apt-get update i got some errors like these:
Code:
Ign http://ftp.de.debian.org jessie InRelease
Ign http://ftp.de.debian.org jessie Release.gpg
Hit http://ftp.de.debian.org jessie Release
Ign http://ftp.de.debian.org jessie/main Sources/DiffIndex
Ign http://ftp.de.debian.org jessie/contrib Sources/DiffIndex
Ign http://ftp.de.debian.org jessie/non-free Sources/DiffIndex
Ign http://ftp.de.debian.org jessie/main armhf Packages/DiffIndex
Ign http://ftp.de.debian.org jessie/contrib armhf Packages/DiffIndex
Ign http://ftp.de.debian.org jessie/non-free armhf Packages/DiffIndex
Hit http://ftp.de.debian.org jessie/contrib Translation-en
Hit http://ftp.de.debian.org jessie/main Translation-en
Hit http://ftp.de.debian.org jessie/non-free Translation-en
Hit http://ftp.de.debian.org jessie/main Sources
Hit http://ftp.de.debian.org jessie/contrib Sources
Hit http://ftp.de.debian.org jessie/non-free Sources
Hit http://ftp.de.debian.org jessie/main armhf Packages
Ign http://ftp.de.debian.org jessie/contrib Translation-en
Ign http://ftp.de.debian.org jessie/main Translation-en
Ign http://ftp.de.debian.org jessie/non-free Translation-en
Hit http://ftp.de.debian.org jessie/contrib armhf Packages
Hit http://ftp.de.debian.org jessie/non-free armhf Packages
Hit http://ftp.de.debian.org jessie/main Sources
Hit http://ftp.de.debian.org jessie/contrib Sources
Hit http://ftp.de.debian.org jessie/non-free Sources
Hit http://ftp.de.debian.org jessie/main armhf Packages
Hit http://ftp.de.debian.org jessie/contrib armhf Packages
Hit http://ftp.de.debian.org jessie/non-free armhf Packages
Err http://ftp.de.debian.org jessie/main Sources
406 Not Acceptable
Err http://ftp.de.debian.org jessie/contrib Sources
406 Not Acceptable
Err http://ftp.de.debian.org jessie/non-free Sources
406 Not Acceptable
Err http://ftp.de.debian.org jessie/main armhf Packages
406 Not Acceptable
Err http://ftp.de.debian.org jessie/contrib armhf Packages
406 Not Acceptable
Err http://ftp.de.debian.org jessie/non-free armhf Packages
406 Not Acceptable
50% [Working]^C
and when I try to install some package:
Code:
apt-get install samba
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.
So I'll load an image from a previous backup.
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Oct 13, 2015, 11:16 AM
Almost there! Did you modify your /etc/fstab? Did you reboot after generating the boot.cmd?
Posts: 24
Threads: 3
Joined: Oct 2015
Reputation:
0
[Solved]
Oct 13, 2015, 11:52 AM
(This post was last modified: Oct 13, 2015, 12:21 PM by murray_00.)
(Oct 13, 2015, 11:16 AM)Mike Wrote: Almost there! Did you modify your /etc/fstab? Did you reboot after generating the boot.cmd
I did change
Code:
/dev/mmcblk0p1 / ext4 defaults,noatime,nodiratime,data=writeback,commit=600,errors=remount-ro 0 0
into
Code:
/dev/sda1 / ext4 defaults,noatime,nodiratime,data=writeback,commit=600,errors=remount-ro 0 0
but at reboot the change wasn't stored... and now i can't edit it anymore...
Code:
chmod: changing permissions of ‘/etc/fstab’: Read-only file system
ls -la | grep fstab
-rw-r--r-- 1 root root 255 Oct 13 13:39 fstab
fixed the fstab problem editing that file (in /tmp/sata/etc/fstab) before rebooting.
Sill I have errors when apt-get udpate. I don't know how to procede :/
df -h it's right.
Code:
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 917G 1.1G 870G 1% /
devtmpfs 498M 0 498M 0% /dev
tmpfs 499M 0 499M 0% /dev/shm
tmpfs 499M 14M 485M 3% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 499M 0 499M 0% /sys/fs/cgroup
tmpfs 256M 0 256M 0% /tmp
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Oct 13, 2015, 03:38 PM
Wow are you really going to run the OS off a 1 TB drive?
Here is the error I can see, ro stands for read only in the remount part, try changing remount-ro to remount-rw
/dev/sda1 / ext4 defaults,noatime,nodiratime,data=writeback,commit=600,errors=remount-ro 0 0
Posts: 24
Threads: 3
Joined: Oct 2015
Reputation:
0
[Solved]
Oct 13, 2015, 04:13 PM
(This post was last modified: Oct 13, 2015, 04:16 PM by murray_00.)
(Oct 13, 2015, 03:38 PM)Mike Wrote: Wow are you really going to run the OS off a 1 TB drive?
I think I will make another partition. For now I'm just trying to make it working =)
BTW edited fstab as you suggested, but still same errors occurr when trying to apt-get update and sill no writing permission for /etc/fstab
|
|
Recent Posts
|
Can Be BeNaughty Legit? 7 Things You Want to Lea...
jonesPhedra Apr 03, 2025, 08:59 AM
|
How to set up Sonarr for auto renaming and impor...
goalken Mar 26, 2025, 04:50 PM
|
How to use Ubuntu server 14.04 as Airplay reciev...
jonesPhedra Mar 25, 2025, 03:48 AM
|
friday night funkin
jonesPhedra Mar 24, 2025, 08:48 AM
|
Split tunneling -> IPtorrentCheck tracker error
jonescelinaa Feb 18, 2025, 09:18 AM
|
Latest unread posts | Unanswered posts |
|