Re: kernel cmdline: root=/dev/sdb1,/dev/sda1 "fallback"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



H. Peter Anvin wrote:
Tomasz Chmielewski wrote:
H. Peter Anvin wrote:
Tomasz Chmielewski wrote:

All right.
I see that initramfs is attached to the kernel itself.

So it leaves me only a question: will I fit all tools into 300 kB (considering I'll use uClibc and busybox)?


You don't need to use busybox and have a bunch of tools.

The klibc distribution comes with "kinit", which does the equivalent to the kernel root-mounting code; it's in the tens of kilobytes, at least on x86. If you're using ARM, you can compile it as Thumb.

Hmm, I'm having problems compiling klibc-1.4 on ARM (using gcc-4.1.1):


Could you send me your kernel .config, as well as what version of the kernel you're building against?

I managed to compile a "Testing" 1.4.31 version (in fact, version 1.4 didn't compile because I didn't have a "linux" link pointing to kernel sources; version 1.4.31 tells that it's missing - so both versions compile fine).

The problem is... I'm not sure how to start with it. The package doesn't have much documentation (other than "read the source"), does it?

On the other hand, I see it comes with a couple of useful tools, like sh (dash)... They are also pretty small, so everything should fit into 300 kB (dash=70kB, kinit=70kB, mount=12kB).

As I understand, this is what I have to do:

1. compile a kernel with initramfs, which will include a cpio image with some tools

2. tools/scripts in cpio image should do the following:

mount /proc
DISKS=$(cat /proc/diskstats)
for WORD in $DISKS
do
[ $WORD = sdb1 ] && echo "partition found, what next?..."
done

# do a similar logic for sda1


Am I correct? Of course I'd appreciate how to achieve point 2 (where now "partition found, what next?..." is).


--
Tomasz Chmielewski
http://wpkg.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux