[1+1=2]

OneAndOneIs2

« The effects of drugsUltimate deletion »

Sat, Oct 25, 2008

[Icon][Icon]Everything is (and should be) a file

• Post categories: Omni, FOSS, Rant, My Life

As mentioned earlier, I installed Linux on somebody's laptop recently. Somebody who just wants to see what Linux is like, not somebody who knows much (or anything) about it.

I installed Ubuntu, in fact. And I was going to give a quick explanation of some of the differences. I was going to start with the "everything is a file that forms part of the one, single filesystem" thing. Then I stopped. Because in Ubuntu, when you put in a DVD, it doesn't (appear) to just become another part of the filesystem. It appears on the desktop as a separate disk. To explain what happens is actually quite complicated: It IS mounted as part of the filesystem, but it pretends it isn't.

So I just shut up and left her to it. I couldn't face explaining it. But it annoyed me.

Everything is a file. There is one filesystem, and everything is a part of it. This is a good thing, not something that should be hidden, or masqueraded as the windows-like multiple filesystems..

It made me suddenly very nostalgic for "proper" Linux. A Linux that doesn't hide things or pretend they're different from how they really are. A Linux that isn't all complicated GUIs trying to make things easier and actually just making them more complicated.

Oh yes they do. Put a DVD into an Ubuntu machine, then log out, log in as another user, and try to eject the disc. It won't work, because you're not the owner of the DVD filesystem that's been mounted in /media. The DVD shouldn't even be mounted, certainly not mounted by a specific user.

So I've got a spare partition, I thought I'd put a decent Linux distro on it to be an alternative to my current choices of Vista or Ubuntu. And Linux From Scratch seemed appealing.

But you need to install it from Linux and Ubuntu doesn't work with my laptop's wireless. So can't download the packages.

However, I know from the recent install that the latest version of Ubuntu is really good at wireless. So I installed the latest version over my old version, and it told me I needed firmware, and duly grabbed and installed it. So I was online at last & I downloaded the LFS LiveCD (easy way to get all the packages & patches) and started working through the instructions.

Or at least, tried to. But Ubuntu doesn't come with the ability to compile software and I can never remember the name of the package you need. Hunted it down & got it, tried again. But I got weird linking error messages. So I got annoyed and decided to look into ALFS - automated installation of a base LFS system.

Downloaded it, tried to start it, got the error message that ncurses wasn't installed. Except it is.

Nnnng.

Ubuntu is clearly not a good place to try and install LFS from. Booting off the LiveCD would be a good idea. Only I have no discs to burn it to.

But this is Linux. Everything is a file. There's no difference, to Linux, between an iso file and a physical CD.

So I mounted the ISO image via the loopback, copied the kernel and initrd files to the hard drive, created a grub entry capable of booting off the ISO (root=iso:/dev/XXX:/path/to/lfslivecd.iso) as per the LFS instructions, and booted into the LFS LiveCD from the ISO image.

Try doing THAT with Windows.

The LFS LiveCD is actually a pretty nice environment. Check it out if you need a LiveCD with a nice but lightweight GUI (It's XFCE) with lots of development tools.

ALFS is now perfectly feasible, but errors out right at the start trying to install GCC. The 1GB partition I have is too small to make it through the install process. A completed LFS is small, but the build process requires all the source code and compilation files, it needs more that a gig.

So I mounted my Ubuntu partition, and put the build directory on it instead. The install ran overnight and I woke up this morning to a completed LFS on the big Ubuntu partition. This I copied over to the smaller one. This is perfectly doable, because everything's a file and it makes no difference where it is on the actual disk.

The system isn't bootable yet - I haven't figured out all the things I need in the kernel - but the number of problems you can solve by virtue of the fact that in Linux, everything is a file and filesystems can be mounted and shunted around and chrooted... it's pretty impressive.

And the way DEs and distros are trying to hide "everything's a file" behind icons to auto-mounted DVDs and the like.. Sorry, guys, but I think your approach sucks.

10 comments

Dirk
Comment from: Dirk [Visitor]
You just saved my life with the remark about the grub entry.
Ma hero!
25/10/08 @ 07:39
oneandoneis2
Comment from: oneandoneis2 [Member] · http://geekblog.oneandoneis2.org/
See? THIS is why people should blog about their Linux experiences! :o)
25/10/08 @ 10:42
Cosmin
Comment from: Cosmin [Visitor] Email
One of the reasons I switched from Kubuntu to Debian testing and Openbox. Now the DE doesn't get in my way.
25/10/08 @ 13:33
herd
Comment from: herd [Visitor] · http://erduman.de
Next time you try something like this from a debian based distribution, have a look at debootstrap -- it's worth it!
25/10/08 @ 22:00
sokuban
Comment from: sokuban [Member] Email
LFS is good and all but, do you seriously have enough free time (or little needs) to get a good system working on it?

Imagine what a pain upgrading would be?

(I always wanted to do LFS but I never got the time I guess, I keep telling myself I'll do it next vacation but who knows.)

On another note I never missed a single article on your blog. I haven't been posting with this account though, I've been too lazy to login.
26/10/08 @ 00:18
Hari
Comment from: Hari [Member] · http://harishankar.org/blog/
The other side of the coin is, in reality, everything *isn't* really a file. How can a file system itself be represented a file under /dev/*? That's what Linux is "abstracting" as a file. It's neither correct nor wrong, but it can potentially be a confusing concept as it's not according to the real hierarchy of a disk setup.
26/10/08 @ 04:31
TIGGR
Comment from: TIGGR [Visitor] Email · http://bitkrafted.blogspot.com
Love your intent here; i love the idea that everything is a file..you should (or have you?) familiarised yourself with JeffRaskin/Aza Raskin's work on ZUI's and the like ?? what you describe here reminds me of their work (Jeff Raskin is the"father" of the Mac UI and the idea behind the one-button mouse, Aza; his son; now works for Mozilla on the UI team, working on some great new mobile UI features (a'la Fennec))...but i digress;

When i bump up against old/obsure hardware and want to "lay some Tux" on it; if Ubuntu doesnt wor then i always try PuppyLinus and Slakware next; i have rarely been dissapointed and, since both are fairly slim distro's, they give the feel of "real LInux" and is good old "One Filesytem to rule them all"..just at though for if you keep having troubles.

Cheers
Tiggr (long time subscriber; first time commenter..BTW Welcome home from your trip :D)
27/10/08 @ 16:20
oneandoneis2
Comment from: oneandoneis2 [Member] · http://geekblog.oneandoneis2.org/
Cosmin: When it comes to WMs, my personal favourite is FVWM, which I used since the mid-90s. But it DOES take some setting up..

Herd: I am considering putting in a very minimal Debian system and building from there. Will have to look into how easy it is to integrate source code & apt, that being one of my other bugbears.

Sok: I've installed LFS before, it's a very good learning experience. So I wasn't too worried about doing it the long way, hence using ALFS. I have pretty much decided not to carry on with it tho, too much time. Shame, there's a lot I like about the basic LFS system..

Hari: Well, no, everything ISN'T a file, but it's represented as though it is. Which can be a bit recursive sometimes, I grant you :o)

Tiggr: Thanks! Haven't read the Raskin stuff, I'll try and find the time somewhere. Slackware is what I've currently got installed as an alternate - it was the first Linux I installed, years ago, and still has a place in my heart. So far, I'm pretty impressed with how much easier to set it up it's been: Sound worked out of the box, wifi was pretty simple to set up, xorgsetup did everything necessary to get the right monitor settings.. very different from my 9.1 experiences!
27/10/08 @ 22:11
Nicholas E. May
Comment from: Nicholas E. May [Visitor] Email · http://may.nonlogic.org
I also miss the days when GNU/Linux was more stripped down. To that end, I've switched to Arch Linux and have started investigating other operating systems.

Speaking of, if you want a system where _everything_ is a file, you might consider trying Plan 9 from Bell Labs. It runs well under QEMU these days, and there is an all-in-one executable available: http://swtch.com/9vx/

P.S. Thanks for your info about ALFS etc., I'll take that into account the next time I find myself gazing longingly at LFS ;) I agree with
03/11/08 @ 03:32
Dominik
Comment from: Dominik [Visitor]
In my oppinion you're missing the point of distros like Ubuntu which are "hiding" the unix file architecture.
Although I'm wondering how you could have missed that point - you stopped trying to explain to that not-so-technically-inclined woman (no offense!). I think the real reason for you stopping your explanation is because the "everything's-a-file-doctrine" is an abstraction of "real events".
To a user, a CD/DVD certainly is a very separate medium than the hard drive. It is handled separately, it can be removed separately, it is being accessed and used separately.
How the underlying software handles that CD is usually irrelevant to the user.

For those who are "technically inclined" and need to solve real software problems there is no problem in understanding "everything is a file" and acting accordingly. You just proved that with the rest of your post. Does the fact that Ubuntu superficially "hides" the nature of the unix file achitecture create any real problems? I don't think so.

Even as a user with some insight knowledge I do appreciate the way Ubuntu handles Discs (except from that weird user-switching problem you described, that shouldn't be!). I do quite some manual labor on my Ubuntu installation, play around, try new software now and then or even try to get VAAPI working :-O, but at the end of the day when I just want to watch a DVD or access some photos of a CD I like Ubuntu for letting me do that without much interference.

IMO, computers are here for serving us, not the other way round. In the last few years we saw a huge development in usability. And thats the direction to go. Thank Progress that the days of "proper" operating systems are over ;)

greetings :)
Dominik
03/01/11 @ 17:12

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)
 

[Links][icon] My links

[Icon][Icon] Hmm.. new look for twitter? I hope it gets less "Ick! Change! Put it back!" nonsense than Facebook..
08/02/12

[Icon][Icon] Facebook Syndication Error
09/02/12

[Icon][Icon] I last listened to:
Johann Pachelbel - Canon in D major

[Icon][Icon] Most recent photo:
Submersible houseboat

[Icon][Icon]About Me

[Icon][Icon]About this blog

[Icon][Icon]My LQ profile

[Icon][Icon]My /. profile

[Icon][Icon]My Wishlist

[Icon]MyCommerce

[FSF Associate Member]


February 2012
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29        

Search

User tools

XML Feeds

eXTReMe Tracker

Valid XHTML 1.0 Transitional

Valid CSS!

[Valid RSS feed]

multiple blogs