Welcome! Log In Create A New Profile

Advanced

Doesn't get HDD boot working on ix2-ng

Posted by killerdude77 
killerdude77
Doesn't get HDD boot working on ix2-ng
May 10, 2021 06:07PM
Hi Bodhi,


I am really sorry to ask you again, but i don't get my NAS booting from HDD.
I got both ide 0 and 1 removed first partition and make a new one starting at 128MB.
Then i made a new uImage and Uinitfs just like making the files for a USB stick.
I used those info to copy those files to both HDD;s with the dd command.

Then i go to U boot and i try to do ide read parameters and then imi to check CRC.
The initramfs image file gives CRC OK, but the linux kernel keeps giving CRC check errors.

I really dont know what to do anymore, i tried to delete the first partition of both the discs a few times, I remade several times uImage and Uinitfs
(by completly start of tar the tarball [did sha256sum check was OK] make the images again en copy those to HDD with dd command.

And still keep getting CRC error.

I will post the error maybe you have some advise.


ide read 0x2100000 0xA000 0x4F00

IDE read: device 0 block # 40960, count 20224 ... 20224 blocks read: OK
Marvell>> imi 0x2100000

## Checking Image at 02100000 ...
Image Name: initramfs-5.11.4-kirkwood-tld-1
Created: 2021-05-10 21:32:48 UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 9694926 Bytes = 9.2 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Marvell>> ide read 0x40000 0x5000 0x2000

IDE read: device 0 block # 20480, count 8192 ... 8192 blocks read: OK
Marvell>> imi 0x40000

## Checking Image at 00040000 ...
Image Name: 5.11.4-kirkwood-tld-1
Created: 2021-05-10 21:32:22 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5363133 Bytes = 5.1 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... Bad Data CRC





I tied so many things and also tried it many times now dont know what to do...


Thanks for the help.


regards

Killer
Re: Doesn't get HDD boot working on ix2-ng
May 10, 2021 06:28PM
killerdude77,

Go back to J's instruction, reread it when in doubt. And check the size of your uImage and uInitrd.

IOW, the file sizes have to match what's in these 2 commands to load them from HDD.

ide read 0x2100000 0xA000 0x4F00 
ide read 0x40000 0x5000 0x2000

-bodhi
===========================
Forum Wiki
bodhi's corner
killerdude77
Re: Doesn't get HDD boot working on ix2-ng
May 11, 2021 04:29PM
Dear Bodhi,

Many thanks for all the help at this moment i have my NAS working, i will keep my NAS bootable from that USB stick.
It has 16GB of storage, so it should be enough for the time.

Now i have a small question about making the NAS wen powering up starting booting from USB standard.

After setting env commands:

setenv load_initrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv usb_boot 'usb start; run load_uimage; run load_initrd; bootm 0x800000 0x2100000'
setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x80000@0(uboot),0x20000@0xa0000(env),0x20000@0xc0000(env2),0x300000@0x100000(uImage),0x400000@0x400000(initrd),0x3f800000@0x800000(boot),1024m@0x0(flash) earlyprintk=serial'


Just to be sure to sure all i have to do after that is run one time the command. saveenv

That will make the NAS boot from USB after each reboot right?


Thanks



killer
Re: Doesn't get HDD boot working on ix2-ng
May 11, 2021 05:03PM
killer,

> Many thanks for all the help at this moment i have
> my NAS working, i will keep my NAS bootable from
> that USB stick.
> It has 16GB of storage, so it should be enough for
> the time.

Good choice. You can put the HDD to sleep most of the time. And do some setup to avoid wearing out the USB rootfs:

http://forum.doozan.com/read.php?2,13702,13704#msg-13704

> Just to be sure to sure all i have to do after
> that is run one time the command. saveenv
>
> That will make the NAS boot from USB after each
> reboot right?

Exactly. saveenv commits the envs changes permanently.

-bodhi
===========================
Forum Wiki
bodhi's corner
killerdude77
Re: Doesn't get HDD boot working on ix2-ng
May 11, 2021 05:50PM
Bodhi


>Good choice. You can put the HDD to sleep most of the time. And do some setup to avoid wearing out the USB rootfs:

>http://forum.doozan.com/read.php?2,13702,13704#msg-13704


Well i got a external HDD on USB, i can use that one to copy the image i made from the USB then i also have an extra storage on my NAS.

In the link you tell about making an zwap file, i dont have a swap file now (htop shows swap has 0MB) what is the best way to make one ?

And how can i make the drives go to sleep ? Any tool for that?


killer
Re: Doesn't get HDD boot working on ix2-ng
May 11, 2021 09:19PM
killer,

> In the link you tell about making an zwap file, i
> dont have a swap file now (htop shows swap has
> 0MB) what is the best way to make one ?

Example: create a 512MB swap file at the rootfs folder /

cd /
dd if=/dev/zero of=swapfile3 bs=1024 count=524288
chmod 600 swapfile3 
mkswap swapfile3

Add it to /etc/fstab

~# cat /etc/fstab | grep swap
/swapfile3     swap            swap    defaults          0       0

With the boxes that have HDD, create this swap file isomewhere in the HDD and adjust /etc/fstab accordingly.


> And how can i make the drives go to sleep ? Any
> tool for that?

See Wiki thread:

https://forum.doozan.com/read.php?2,23630

Quote

Linux Tools

Debian hdparm (HDD spin down)

-bodhi
===========================
Forum Wiki
bodhi's corner
killerdude77
Re: Doesn't get HDD boot working on ix2-ng
May 12, 2021 07:10PM
Bodhi,

Thanks for the advise, the NAS is working from USB now and also auto boot to USB.

i only had to add an extra bootcmd with. setenv bootcmd 'run usb_boot'

After that the machine runs perfectly with autoboot to USB. No seriasl connection neccesary anymore.

I only found out that i didn't used a 32GB USB stick but a 4GB :(

Soo i made an image of my USB /defv/sdc (not sdc1 or sdc2) with dd and after that restored the image to and 16GB USB Stick.

After the restore i resized the partition to 30G. After that i rebooted the NAS.

Everything boots up fine, i see in fdisk the /dev/sdc is 30G, but the rootfs stays the old 4GB. The rootfs is sdc1 and also that partition is 30G now. But in df -hT it still shows 4GB.

Do you have any suggestions how to fix this because now my rootfs is 4GB and filled 99%, but the partition should be giving enough space.

also i get error that swapfile3 cannot load systemctlv gives:

systemctl status mnt-sda1-swapfile3.swap
‚óŹ mnt-sda1-swapfile3.swap - /mnt/sda1/swapfile3
Loaded: loaded (/etc/fstab; generated)
Active: failed (Result: exit-code) since Wed 2021-05-12 16:33:57 PDT; 35min ago
What: /mnt/sda1/swapfile3
Docs: man:fstab(5)
man:systemd-fstab-generator(8)

May 12 16:33:57 killerNAS systemd[1]: Activating swap /mnt/sda1/swapfile3...
May 12 16:33:57 killerNAS swapon[245]: swapon: cannot open /mnt/sda1/swapfile3: No such file or directory
May 12 16:33:57 killerNAS systemd[1]: mnt-sda1-swapfile3.swap: Swap process exited, code=exited, status=255/EXCEPTION
May 12 16:33:57 killerNAS systemd[1]: mnt-sda1-swapfile3.swap: Failed with result 'exit-code'.
May 12 16:33:57 killerNAS systemd[1]: Failed to activate swap /mnt/sda1/swapfile3.

DO you also have an idea how i can fix that also?


Thanks again for the support Bodhi



killer
Re: Doesn't get HDD boot working on ix2-ng
May 12, 2021 07:33PM
1 For file system size, do some research on these two commands

resize2fs / fsck.ext4

2 Don't swap on flash file system. The flash drive will be corrupt soon (usually in 1 year). :P
killerdude77
Re: Doesn't get HDD boot working on ix2-ng
May 12, 2021 08:15PM
daviddyer,

thanks for the hint to look in resize2fs and fsck.ext4, but the USB stick is ext3 and has 1 partition (as you get from using the rootfs bodhi install).

I will check with that tool what i can do.


As for the swapfile3, it is on the HDD and now worries about that. I was to soon with trying it out and forget to set the right place in fstab.

Soo that is working great also now.

All i want to try now is make dd of the usb and then copy this to my sdb1, and then try to boot from that place. i keep updates here if it is working.

Right now my discs look like this with df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
udev           devtmpfs  115M     0  115M   0% /dev
tmpfs          tmpfs      24M  2.9M   22M  12% /run
/dev/sdc1      ext3      3.6G  3.4G   92M  98% /
tmpfs          tmpfs     120M     0  120M   0% /dev/shm
tmpfs          tmpfs     5.0M  4.0K  5.0M   1% /run/lock
tmpfs          tmpfs     120M     0  120M   0% /sys/fs/cgroup
/dev/sda1      ext3      7.2G  530M  6.3G   8% /mnt/sda1
/dev/sdb1      ext3      7.2G  753M  6.1G  11% /mnt/sdb1
tmpfs          tmpfs     120M     0  120M   0% /tmp
/dev/md0       ext4      3.6T  304G  3.1T   9% /raid0_stripping
tmpfs          tmpfs      24M     0   24M   0% /run/user/0


As you see i have 2 discs in my NAS /sda and /sdb

I used /sda2 ands /sdb2 for raid /dev/mt0

Soo i have /sda1 and /sdb1 for extra storage, /sda1 runs swap, but i can also use for storing img backups of USB.

With /sdb1 i want to try to make it bootable, i dont know exactly what bootcmd and args must be used exactly but i will try to find it out.

======
moderator edit: please use code tags for log.



Edited 1 time(s). Last edit at 05/12/2021 10:01PM by bodhi.
Re: Doesn't get HDD boot working on ix2-ng
May 12, 2021 10:09PM
killer,

>
> As for the swapfile3, it is on the HDD and now
> worries about that. I was to soon with trying it
> out and forget to set the right place in fstab.

Sounds good.

Either swap on HDD, or set it to no swap.

> With /sdb1 i want to try to make it bootable, i
> dont know exactly what bootcmd and args must be
> used exactly but i will try to find it out.

As long as the sdb1 partition is labeled as rootfs then it will boot from there.

So you need to change the label for the new rootfs on sdb1 to rootfs, and the current rootfs on the 1st USB to some other name.

Your current envs is good enough for booting a box with one USB drive that contains the rootfs. But with multiple USB plugged in, there is no guarantee that u-boot will pick the right one.

More to be done with the envs, so that you can have multiple USB drives plugged in during boot. I'll come back for that.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 05/12/2021 10:10PM by bodhi.
killerdude77
Re: Doesn't get HDD boot working on ix2-ng
May 12, 2021 10:45PM
Bodhi,

I don't use multiple USB sticks, i was thinking i made a 16GB USB stick but i it a 4GB, soo i dd this disc to a 16GB USB stick for more space.

But now i don't get the rootfs on the full size of the new USB stick. In df it shows still 4GB in fdisk is shows 30GB and in paerted it also shows up as a 30G stick. I don't understand why the size is not extended from the rootfs.

Can i fix that with resizer2fs ?


Furthermore the swap3 works like a charm on the HDD now, it runs from sda1 and by setting the UUID in fstab it worked just fine. In all the speed i forget to set it in the fstab.
Re: Doesn't get HDD boot working on ix2-ng
May 12, 2021 10:55PM
killer,

> But now i don't get the rootfs on the full size of
> the new USB stick. In df it shows still 4GB in
> fdisk is shows 30GB and in paerted it also shows
> up as a 30G stick. I don't understand why the size
> is not extended from the rootfs.

That was because you used dd to copy the rootfs. Remember, dd should not be used ever, if there is an alternative normal way to do the same job. In this case, the good apprach is to use cp or tar command to copy the rootfs.

Here is the right way, using tar command:

https://forum.doozan.com/read.php?2,12096,24034#msg-24034

> Can i fix that with resizer2fs ?

Yes, David's recommendation is good, if you don't want to repeat the coyping. However, since this is the start of your setup, nothing lost by recreating the rootfs as I've described in the linked post above. I would do that using tar instead of resizer2fs.

>
> Furthermore the swap3 works like a charm on the
> HDD now, it runs from sda1 and by setting the UUID
> in fstab it worked just fine. In all the speed i
> forget to set it in the fstab.

See this is the thing people usually overlooks. You do have multiple USB drives plugged in during system start up. This is a USB HDD, right? so that'd make it at least 2 USB drives.

-bodhi
===========================
Forum Wiki
bodhi's corner
killerdude77
Re: Doesn't get HDD boot working on ix2-ng
May 13, 2021 06:02PM
Dear Bodhi,

Yeah i already figurd out that it was a to big hustle to resize and such. Soo i made a completly new USB stick with enough space.
I also installed the 5.11 kernel soo the stick is up to date as well.

The only message i get warning with boot is:
[warn] Not starting NFS kernel daemon: no exports. ... (warning).


>>See this is the thing people usually overlooks. You do have multiple USB drives plugged in during system start up. This is a USB HDD, right? so >>that'd make it at least 2 USB drives.

About the swapfile it is running from internal HDD, my NAS has 2 HDD bays. Soo that works great. The only thing is at boot i get warning swapfile could not load because he is still busy with mounting the internal drives, but a moment later he gives message that swapfile is activated, Is there a way to let the swap mount in fstab do a pauze of 5 seconds after mounting the internal drives? The swap add is already on the last line in fstab.

No i don't have multiple USB drives, i only have 1 USB port on my NAS. But i was mixed up witch USB stick i was using, i was thinking i used a 16GB drive but fount out is was a 4GB. I don't use a USB HDD. it was actually to look if we bypass the writes to usb to safe the stick. But now with swap on internal it was not neccesary anymore.


Last question is about a software packet or build. First i had on my NAS lifeline software to administrate the NAS in a browser.
Is there a sort of complete packet to make my NAS has that too? something like freeNAS or something.

Many thanks for all the help, the NAS is up to date, lost all his security flaws what was in the old software. And also not unimportant too the NAS is not calling home (Lenovo, Iomega) anymore.


Best regards


killer
killerdude77
Re: Doesn't get HDD boot working on ix2-ng
May 13, 2021 06:07PM
Bodhi,

Here a small screenshot of my system, it works very nice, nefore the box used easely 100MB memory and look now....


CPU[|| 1.3%] Hostname: killerNAS
Time: 16:04:02
Mem[||||||||||||||||||||17.4M/237M] Uptime: 00:32:01
Tasks: 17, 1 thr, 62 kthr; 1 running
Swp[ 0K/512M] Load average: 0.00 0.00 0.02
CPU: 0.7% sy: 0.7% ni: 0.0% hi: 0.0% si: 0.0% wa: 0.0%

Linux killerNAS 5.11.4-kirkwood-tld-1 #1.0 PREEMPT Sun Mar 7 18:16:07 PST 2021 armv5tel GNU/Linux.


As you see very slick. Thanks for your time.. BIG Thumbs up
Re: Doesn't get HDD boot working on ix2-ng
May 14, 2021 06:30AM
Cool!

Quote

The only message i get warning with boot is:
[warn] Not starting NFS kernel daemon: no exports. ... (warning).


The only thing is at boot i get warning swapfile could not load because he is still busy with mounting the internal drives, but a moment later he gives message that swapfile is activated,

These are perfectly normal. 1) You have not set up NFS shares yet, 2) the swap file is on the HDD (not on rootfs) so it was postponed a bit.

-bodhi
===========================
Forum Wiki
bodhi's corner
killerdude77
Re: Doesn't get HDD boot working on ix2-ng
May 14, 2021 03:51PM
Dear Bodhi,

Well after setting init=/bin/systemd in setenv and then saveenv the error is gone.

But after some apt installs i get this message:

Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 12.1M are free, but a safety buffer of 16.0M is enforced.
Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 12.1M are free, but a safety buffer of 16.0M is enforced.

in df i get:

Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 114M 0 114M 0% /dev
tmpfs tmpfs 24M 12M 13M 49% /run
/dev/sdc1 ext3 30G 2.5G 26G 9% /
tmpfs tmpfs 119M 0 119M 0% /dev/shm
tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs tmpfs 119M 0 119M 0% /sys/fs/cgroup
/dev/sda1 ext3 7.2G 587M 6.3G 9% /mnt/sda1
/dev/sdb1 ext3 7.2G 753M 6.1G 11% /mnt/sdb1
tmpfs tmpfs 119M 0 119M 0% /tmp
/dev/md0 ext4 3.6T 1.1T 2.3T 33% /mnt/RAID0
tmpfs tmpfs 24M 0 24M 0% /run/user/0

As you can see it used the first tmpfs of 24MB mounted at /run

can i resize that? because 24MB is a little short.


Regards



killer
Re: Doesn't get HDD boot working on ix2-ng
May 14, 2021 04:46PM
killer,

I can't help much with systemd related issues.

But there is the usual systemd problem with memory during boot. You might want to try:

- a swap space right of the bat. Meaning it is best to have a swap file on the rootfs during boot. So set up 2 swap files in fstab. After the system has booted, turn off the one on USB rootfs.
- Increase tmpfs size.

-bodhi
===========================
Forum Wiki
bodhi's corner
mrniceguy
Re: Doesn't get HDD boot working on ix2-ng
May 24, 2021 07:59PM
Hey Bodhi and JWL

After many many attemps of rewriting the Uimage and the initrafs to my internal harddrives (i did it on both drives only sdb labels rootfs)
And every time i get the same CRC error on checking image with imi command. I am now trying to get this work for a few weeks but it doesn't want.

I dont know how it is possible but i am guessing it got something to do with the block it reads for ide.
with ide read 0x2100000 0xA000 0x4F00 the 5.2.9 initramfs reads OK.

with ide read 0x40000 0x5000 0x2000 i get CRC error for kernel 5.2.9
with ide read 0x40000 0x800 0x1800 i get 2.6.31.8 kernel and that one gives me OK.
If i try to play with the numbers i only get Bad Magic numbers or it looks like he reads the whole disc and hangs (offcourse)..

Could you explain a little bit of those ide reads.

you give 3 values, the first one will probably give the first place where to start read. the other values will probably be for a device and an end to stop reading probably.

And because i am not runnig the kernel 4.11 where this is all made for the image is now bigger and needs other values now i think.

I hope you can help me with this.


greetz


killer
Re: Doesn't get HDD boot working on ix2-ng
May 24, 2021 09:38PM
Hi, yes the issue you are having is that the kernel size has changed.

You need to adapt the kernel size parameter to match the size of kernel you are loading and also make certain the kernel you wrote to the hard disk was written completely.

Start with the kernel I used, 4.11, and make sure you can make that work.

Really, loading the kernel and initrd from USB is a better solution, while keeping the rootfs on the hard disk. I use raw sectors to be able to use the USB port for other devices, but using raw sector loading is a huge pain in the neck.
killerdude77
Re: Doesn't get HDD boot working on ix2-ng
May 24, 2021 10:33PM
Dear Jdwl,


I did soo many things to try to get the NAS running from HDD, and in one of those times it did run the rootfs from hdd.
I tried it to boot again and actually keeping it like that but didn't get it working anymore after the first time.

I will post my printenv in the next post maybe you can see what i need to change to get kernel running from usb and rootfs back on sdb1.
killerdude77
Re: Doesn't get HDD boot working on ix2-ng
May 24, 2021 10:44PM
This is my printenv:

| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__| ** ix2-spi ** ** uboot_ver:0.0.8 **

** MARVELL BOARD: DB-88F6282A-BP LE

U-Boot 1.1.4 (Oct 28 2011 - 15:18:22) Marvell version: 3.6.1 - EMC

U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CD5A0

Soc: 88F6282 A1 CPU running @ 1600Mhz L2 running @ 800Mhz
SysClock = 533Mhz , TClock = 200Mhz

DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
DRAM CS[0] base 0x00000000 size 256MB
DRAM Total size 256MB 16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
Found ADT7473, program PWM1 ... OK
[1024kB@f8000000] Flash: 1 MB

Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
Device 0 @ 0 0:
Model: ST2000DM001-9YN164 Firm: CC4B Ser#: W1E1RW8N
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
[0 1 0]: Enable DMA mode (6)
Device 1 @ 0 1:
Model: ST2000DM001-9YN164 Firm: CC4B Ser#: W1E1V2AX
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)


CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
PEX 1: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 0
Marvell>> printenv
baudrate=115200
loads_echo=0
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
console=console=ttyS0,115200
bootargs_root=root=/dev/ram0
bootargs_mtd=mtdparts=spi_flash:0x7e000@0(u-boot),0x1000@0x7f000(env),0x1000@0x7e000(env2)
kernelimage=zImage
initrdimage=mfginitrd
ipaddr=192.168.1.2
mfgmodel=ix2
preroot_ver=0.0.2
fw_ver=3.3.2.18857
uboot_ver=0.0.8
runintime=10800
ftpserver=192.168.43.4
testfile=100M
pre_path=IX2/1.0.3/download_runin.sh
pre_path_conf=IX2/1.0.3/download_runin.conf
pre_serverip=192.168.32.4
pre_user=ixxrunin
pre_passwd=123
pre_dirzi=IX2/1.0.3
serverip=192.168.32.4
mfgtest_state=final_tested_ok
usb_boot=usb start; run load_uimage; run load_initrd; bootm 0x800000 0x2100000
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x80000@0(uboot),0x20000@0xa0000(env),0x20000@0xc0000(env2),0x300000@0x100000(uImage),0x400000@0x400000(initrd),0x3f800000@0x800000(boot),1024m@0x0(flash) earlyprintk=serial
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
load_initrd=ide device 1; ide read 0x2100000 0xA000 0x4F00
bootcmd2=ide device 1; run usb_boot; ide read 0x2100000 0xA000 0x4F00; bootm 0x40000 0x2100000
bootcmd=ide device 1; run usb_boot; ide read 0x2100000 0xA000 0x4F00; bootm 0x40000 0x2100000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
pcieTune1=no

Environment size: 2312/4091 bytes
Re: Doesn't get HDD boot working on ix2-ng
May 25, 2021 02:15AM
killerdude77,

> I will post my printenv in the next post maybe you
> can see what i need to change to get kernel
> running from usb and rootfs back on sdb1.

Your envs are already good to go for kernel on USB and rootfs on HDD before. You had that settings when you booted with USB rootfs.

So go back to those setenv commands to boot with USB rootfs. Make sure you test boot it to make sure it is OK.

And then do these 4 steps below. You just need to set up your box correctly.

1. Make sure the rootfs on HDD has label rootfs

2. Change the label of the USB rootfs partition to kernel (or any name you want to, except rootfs). rootfs label is taken by the HDD now

3. Now, at this point, if you have already installed a lot of packages on the USB rootfs, you would want to copy this rootfs to the HDD so you don't waste time recreate them.

4. Remove all files in the rootfs on USB, but leave the /boot folder intact as is before.

That's it. You don't need to mess with writing uImage and uInitrd to raw sectors again.

===

Item number 3 can be done using tar command as described here:

https://forum.doozan.com/read.php?2,12096,24034#msg-24034

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 2 time(s). Last edit at 05/25/2021 02:24AM by bodhi.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: