现在的位置: 首页 > 综合 > 正文

booting ext3

2012年12月16日 ⁄ 综合 ⁄ 共 4289字 ⁄ 字号 评论关闭

 

 

http://archlinuxarm.org/forum/viewtopic.php?f=23&t=499

 

booting ext3

Postby
Coopy » Thu Dec 09, 2010 7:24 pm

Hey,
I installed Arch Linux ARM install on an external hard drive which is formatted to ext3.
So after installing the command:
/usr/sbin/fw_setenv usb_rootfstype ext3
made sure that the machine boots to Arch Linux ARM install after reboot.

Well, how to make that change permament? At the moment the machine boots to the original OS when rebooting.
I looked through the script made by jeff with no idea what to do :(

With regards,
Coopy

Coopy
Posts: 2
Joined: Sun Oct 10, 2010 9:51 am


Re: booting ext3

Postby
peaslaker » Fri Dec 10, 2010 11:07 pm

U-Boot has to be able to read a partition to find the kernel.

U-Boot can't read ext3.

Setting commands for the kernel to boot a rootfstype of ext3 does no good if U-Boot can;t find the kernel in the first place.

Your options are:
1.  Partition your disk to have a boot (ext2) partition and a separate root (ext3) partition and change your boot partitions to match

  2. Do a NAND install using UBIT which does all the hard work for you. (but I would say that seeing as I developed UBIT)

peaslaker
Posts: 101
Joined: Tue Sep 07, 2010 10:40 pm


Re: booting ext3

Postby
Coopy » Mon Dec 13, 2010 5:34 pm

Thanks for the reply

Iam a bit confused  :?
Why is U-Boot able too boot to my ext3 partition after I excecuted
/usr/sbin/fw_setenv usb_rootfstype ext3  and then reboot?

Coopy
Posts: 2
Joined: Sun Oct 10, 2010 9:51 am


Re: booting ext3

Postby
peaslaker » Thu Dec 30, 2010 9:24 pm

The rootfs can be ext3, but the boot partition cannot be ext3.  The boot partition is the location of the kernel.  Unless you go out of your way to place the kernel somewhere bootable you're not going to get anywhere.

'rootfstype' is a parameter that is passed to the kernel.  It is only relevant at the point when a kernel has been loaded into memory and is initialising.  If the only place your kernel exists is on an ext3 partition, U-Boot cannot find it and cannot load it
into memory.

peaslaker
Posts: 101
Joined: Tue Sep 07, 2010 10:40 pm


Re: booting ext3

Postby
Samson » Fri Jan 14, 2011 10:06 am

uboot ext2load is able to load kernel image from ext3 partition so the boot partition can also be ext3...

Code:
Select all
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1434220 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
4736952 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-2.6.32-5-kirkwood
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1434156 Bytes = 1.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-2.6.32-5-kirkwood
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4736888 Bytes = 4.5 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

root@debian:~# mount
rootfs on / type rootfs (rw)
/dev/sda1 on / type ext3 (rw,noatime,errors=remount-ro,data=ordered)

~# df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                1.9G  290M  1.5G  17% /
none                   60M   32K   60M   1% /dev
/dev/sda1             1.9G  290M  1.5G  17% /
tmpfs                  62M     0   62M   0% /lib/init/rw
tmpfs                  62M     0   62M   0% /dev/shm
tmpfs                  62M     0   62M   0% /tmp

Samson
Posts: 4
Joined: Fri Jan 14, 2011 10:04 am


Re: booting ext3

Postby
peaslaker » Fri Jan 14, 2011 8:18 pm

My previous comments were out of place and were based on observations made when I was dealing with a dodgy USB stick.  Confused me at the time because ext3 will mount as ext2 anyway.

The OP's question, although ostensibly about booting from ext3 was also about a situation given by a problem with the USB boot medium.

A huge number of booting problems are caused by USB sticks not initialising reliably.

peaslaker
Posts: 101
Joined: Tue Sep 07, 2010 10:40 pm


Re: booting ext3

Postby
Samson » Fri Jan 14, 2011 10:49 pm

Coopy wrote:Thanks for the reply

Iam a bit confused  :?
Why is U-Boot able too boot to my ext3 partition after I excecuted
/usr/sbin/fw_setenv usb_rootfstype ext3  and then reboot?

If you printenv in the uBoot prompt of Jeff's uBoot you will see usb_rootfstype only set the rootfs partition type in your attached USB device when booting via USB, it doesn't affect the booting from NAND, so before that you failed to boot from your USB device
after formatted to ext3 is due to the default setting of usb_rootfstype is ext2 and being passed to the kernel.

Last edited by
Samson
on Fri Jan 14, 2011 10:53 pm, edited 2 times in total.
Samson
Posts: 4
Joined: Fri Jan 14, 2011 10:04 am


Re: booting ext3

Postby
Samson » Fri Jan 14, 2011 10:52 pm

peaslaker wrote:A huge number of booting problems are caused by USB sticks not initialising reliably.

Coopy seems talking about an external USB hard drive not a stick...

Samson
Posts: 4
Joined: Fri Jan 14, 2011 10:04 am

抱歉!评论已关闭.