LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tomasz Chmielewski <mangoo@wpkg.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>, linux-kernel@vger.kernel.org
Subject: Re: kernel cmdline: root=/dev/sdb1,/dev/sda1 "fallback"?
Date: Thu, 18 Jan 2007 12:48:30 +0100	[thread overview]
Message-ID: <45AF5E8E.9020607@wpkg.org> (raw)
In-Reply-To: <45AF502F.9010009@zytor.com>

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


  reply	other threads:[~2007-01-18 11:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-17 12:58 Tomasz Chmielewski
2007-01-17 13:37 ` Jan Engelhardt
2007-01-17 14:09   ` Tomasz Chmielewski
2007-01-17 20:33     ` H. Peter Anvin
2007-01-18 10:33       ` Tomasz Chmielewski
2007-01-18 10:47         ` H. Peter Anvin
2007-01-18 11:48           ` Tomasz Chmielewski [this message]
2007-01-18 18:48             ` H. Peter Anvin
2007-01-17 13:37 ` Alon Bar-Lev
2007-01-17 13:56   ` Tomasz Chmielewski
2007-01-17 14:06     ` Alon Bar-Lev
2007-01-17 14:12       ` Jan Engelhardt
2007-01-18 10:50 Al Borchers
2007-01-18 14:21 ` Tomasz Chmielewski
2007-01-18 20:33   ` H. Peter Anvin
2007-01-19  4:12   ` Al Borchers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45AF5E8E.9020607@wpkg.org \
    --to=mangoo@wpkg.org \
    --cc=hpa@zytor.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: kernel cmdline: root=/dev/sdb1,/dev/sda1 "fallback"?' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).