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

Re: compiling for non-factory




On Fri, 28 Apr 2000, Steven Pritchard wrote:
> Cloudmaster said:
> > Well, that's kinda how I got the "stripped" size in my original message...
> Crap.  Sorry, I wasn't paying enough attention.

's OK - I tend to do my share of not paying attention...  That might be the
reason I've not graduated yet. :)

> FWIW, I was able to build a single-disk (or maybe it was two disks...
> I don't remember now) recovery system using glibc a couple of years
> ago.  It was rough, but the procedure went something like this:
> 
>     * Start with a directory to dump everything in.

I'm using a loop-back device and a disk image, a la 
	dd if=/dev/zero of=/tme/diskimage bs=1k count=2000
It makes it easy to make the floppy, 'cause I've just gotta
	sync;gzip -c9n /tmp/diskimage | dd of=/dev/fd0 bs=1k seek=$KOFFSET
where KOFFSET is the size of my kernel rounded up to the next 1 K.

>     * Create necessary files like /etc/passwd, /etc/group,
>       /etc/ld.so.conf, etc. in the image.

[...]
You can actually go without passwd and group if you don't mind numbers, and
ldconfig will create .conf on it's own, won't it?  I guess they'd be nice
for a rescue disk, though. :)
[...]

>     * Copy /sbin/ldconfig to the image.
>     * Use chroot(1) to run ldconfig in the image to create
>       /etc/ld.so.cache in the image.

You can use "ldconfig -r" to take care of that whole thing in one
step.  It's my new best friend, "-r" is. :)

>     * Build bash with the --enable-minimal-config configure option (I
>       like bash better than stuff like ash) and copy it to the image.

Remind me to post my impressions of the new busybox's sh-like shell once I
get it compiled.  Unless, of course, someone else wants to do that for
me.  As long as I have command history, I'm happy.  Tab-completion should
make me uber-happy.  And it's small.
[...]

>     * Use chroot(1) to make sure that /bin/bash in your image actually
>       runs.

Eh, screw testing.  Fire it up and try to debug without a shell. :)

>     * Make a disk image (i.e. with "dd if=/dev/zero of=file bs=4k
>       count=1k").

Oh.  That would probably make my life a lot easier, especially when I modify
the image.  I think I'll start using a directory right now instead of my
"work from an image" thing.  What the hell was I thinking?  forgot all about
"tar" copying devices and stuff...

>     * Make a Minix filesystem on the disk (with "mkfs -t minix file").
>       The Minix filesystem limits you to 14-character filenames, but
>       it has less overhead (so it uses less space)...

Yet another good idea.  I'll have to try that.  Is it OK to use minix for
the root fs if I'm using a compressed diskimage?
[...]

Thanks man.  I've got the 2 diskimages I've been playing with (dormroute and
cableroute) up on my projects page, but they're not yet downloadable 'cause
I'm lazy.  I guess I'll have to get the mobile mp3 player filesystem up
there sometime real soon now too, since people have actually given me some
hints.  Gotta beat that "everyone already has one" thing, but I'm running
out of time for that...

Eh, I'll stop with the long messages now by adding another long sentence
that doens't need to be here.

--Danny


--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.