Log in

No account? Create an account
brad's life [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

debootstrap [Mar. 11th, 2004|10:01 am]
Brad Fitzpatrick
Rebuilt my desktop computer tonight, but preserving the old image just in case. So easy when you're netbooting!

Before my machine booted off and my mp3 player booted off /home/diskless/enty.

So, wanting to start fresh:

- mkdir /home/diskless/papag-2
- debootstrap sarge /home/diskless/papag-2
- add to /etc/exports
- restart my desktop.

So fucking easy. Why didn't I think of this before?

And now all my random configuration problems that have built up over the years are gone.

My next goal is to put my root filesystem on an ENBD block device, rather than NFS. (since it's not shared) Then just my /raid export (with media files and my $HOME) will be NFS.

[User Picture]From: ydna
2004-03-11 11:02 pm (UTC)
Okay, I give up. I've got to try doing things this way. You're not using any local disk at all, huh? And things run okay? Is this over 100Mbps Ethernet? That would just kick the shit out of using fai.
(Reply) (Thread)
[User Picture]From: brad
2004-03-11 11:07 pm (UTC)

$ cat /proc/cmdline
vga=extended load_ramdisk=1 prompt_ramdisk=0 ip=dhcp root=/dev/nfs rw nfsroot= BOOT_IMAGE=kernel

Same way all LJ web nodes boot.
(Reply) (Parent) (Thread)
[User Picture]From: blueroo
2004-03-12 12:19 am (UTC)
Clever and useful, all at once. :)

I would netboot my workstation but my switch has a tendancy to lock on me under high network load which does not make for a happy computer.

How fast does your workstation boot? And how fast does a web node boot?
(Reply) (Parent) (Thread)
[User Picture]From: brad
2004-03-12 12:21 am (UTC)
No different from a normal computer. Feels a little faster, if anything, but maybe because I don't hear grinding.

It's not like it copies 2GB of crap on boot or anything.
(Reply) (Parent) (Thread)
[User Picture]From: blueroo
2004-03-12 12:30 am (UTC)
I was expecting you might find it was faster, actually. ATA disk initialization seems to take a long time in Linux, and of course SCSI init takes quite a few seconds.
(Reply) (Parent) (Thread)
[User Picture]From: brad
2004-03-12 12:33 am (UTC)
I just meant it was on the same order of magnitude speed-wise. I did say it felt faster.

(I've had people complain about netboot to me in the past, where what they really had experience with was, for example, library computers were everybody login it copied the whole system image to the hard drive....)
(Reply) (Parent) (Thread)
[User Picture]From: blueroo
2004-03-12 12:35 am (UTC)
(Reply) (Parent) (Thread)
[User Picture]From: brad
2004-03-11 11:08 pm (UTC)
100Mbps. Runs fine.
(Reply) (Parent) (Thread)
[User Picture]From: gaal
2004-03-12 01:17 am (UTC)
How much RAM would a netbooting box have to have if it wants to run X, but not very much else?

Have you had any thoughts about a setup that isn't critically reliant on the server being up at run time? (If your server crashes today, does the desktop hand and resume when it's up again, or is it good as dead?)

I'm still thinking of converting an old laptop to wall candy.
(Reply) (Thread)
[User Picture]From: brad
2004-03-12 01:21 am (UTC)
I have no clue how little memory you'd need.

File IO obviously blocks when the server goes down, but resumes when the server's back. Otherwise the machine's still usable.
(Reply) (Parent) (Thread)
From: evan
2004-03-12 09:36 am (UTC)
what's the benefit of enbd? is it more efficient because it's less complicated?
(Reply) (Thread)
[User Picture]From: brad
2004-03-12 11:10 am (UTC)
NFS: assumes it's shared. assumes files can change any any time. has to do NFS mangling, then network, then server has to do filesystem mangling. only the server can do real block-layer caching.

enbd: the server's doing way less work (just passing read/writes), the client's not sharing the device, so it knows exactly when things are dirty or not (doesn't have to assume files/dirs are untouched for 3 seconds, then force a round-trip to ask), only one participant is going through filesystem code (the client)

We run one LJ database over iSCSI (which is kinda like [e]nbd)... not bad at all.
(Reply) (Parent) (Thread)