Thursday, December 01, 2005

LFS Profile for package user

Here is a page from LFS profile I created. It might help you modify the other pages. I'll put up everything shortly after I find a file host that doesn't mind hot linking.

coreutils.xml

Up and running, A happy system.

Categories:

After My last attemp succeeded, I moved onto BLFS(didn't use profiles because this is my first BLFS attempt and I wanted to do it by hand.) My PC is happy and so am I. Initially I started with console only PC(mplayer and all). Then I needed firefox badly and installed X. No sweat here. I've put firefox and gaim in xinitrc and everything just worked. After a bit of probing from a friend, I finally gave in and installed XFCE. Now even my friends can use it.

Here is my package list(/etc/passwd)

There are a few more packages and things I wanna talk about, but later.

Monday, November 21, 2005

Second attempt at nALFS + package users

Categories:

Last night I have run another build and found a few problems.

Sunday, November 20, 2005

First attempt at nALFS + package users

Categories:

I tried to modify the LFS-6.1-1 ALFS profile for implimenting the changes. I used 6.1 live cd and there are a few digest mismatches. Apparently there was a server hickup and things changed. I guess it's okay to ignore them. The rest of the errors and temporary work arounds are here.

patched nALFS to use /etc/passwd from $LFS

Categories:

The earlier patch for uid:gid failed because You can't use it to set additional groups which is required because package users use sticky bit of install dirs owned by install group.

So once more I found myself looking at nALFS code. This time I was looking at change group function in stage.c and discovered that it had been modified earlier for use in chroot environment. I knew it when I saw because I was hoping to use the fget.... functions too. Hmm, looks like the team has forgot to change the change_to_user function. I did it and here is the patch. It's working just fine.

nALFS-1.2.5-change_to_user.patch

Thursday, November 17, 2005

patched nALFS to use uid:gid style user info

Categories:

As I got no replies for my mail to alfs mailing list, I have finally decided to get my hands dirtier (They are already dirty). I have made a patch for nALFS that seems to do the job of using <user>uid:gid</user>. the usual at your own risk blah blah... disclaimer.

The format <user>uid:gid</user> has to be strictly followed and it won't check for the format, neither does it have any defaults in case you omit anything. I don't know if I have broken the original functionality. I had to bypass the user not found check and I didn't care to adopt it, instead I removed it. So I suggest either you look into it and modify it further or wait till my exams are over and I'll be more free to work them out.

There is one more catch, there are two files with same function which are exact replicas. But I changed only one that was being used when I traced it in gdb. Be warned, its only a couple of days since I started using gdb. Thanks to Kousik and Sunny.

nALFS-1.2.5-user-UID.patch

Wednesday, November 09, 2005

package users and nALFS: define package id in users tag

Categories:

The other option Iwas left with is to use use numeric uid in <users></users>. But can it take the syntax <users>uid:gid</users> because without gid, it is going to be a mess unless taken care of. or is it going to default to the uid value for gid too? I have to experiment and find out. unless some one can help me here.

Another thing I can do is (in case it won't take the gid) set the gid while cleaning up with something like find / -uid $UID -exec chgrp $GID {} and take extra care to set gid before making any suids.

Tuesday, November 08, 2005

Bug 1058 - changing user breaks when chrooted in script

Bug 1058 - changing user breaks when chrooted in script

I tried to make matching entries in /etc/passwd and /etc/groups on the host and still getting the user not found error.

Here are the contents I appended to the host contents.


/etc/passwd
/etc/group

Saturday, October 29, 2005

Use fake package users

Categories:

So I need to use user IDs, huh? Wonder how I can catch the output of the script and place it in xml. If that can't be done, I can always use a package-userid xml entity in package.ent.

The first seems to beimpossible as of now and the second is a head ache. I think I will modify the add_user script so that it can be run from host root and make changes to $LFS/etc/passwd and /etc/passwd. Well, The following schema should work.

  • The users on host should all belong to a temp group so that they can be removed easily after the build is done. But still I don't like messing my host system.
  • The id finding algo should check both the files to find the usable ID. This can be ensured by making the range availiable in host passwd filed, but some how I don't like to depend on that !

nALFS for package user approach

Categories:

Building using nALFS along with package user approach. But it gives errors. Attached the relevent files and log extracts.

nALFS log

libc-linux.xml

Friday, October 28, 2005

Linux From Scratch

Categories:

So I switched to LFS.

You might exclaim, "what the...!! You hardly started with slack." hmm... Yes I did, but I tweaked it a bit but never posted all that here. I don't like documentation much. How ever for the records I ompiled the kernel successfully on my sister's PC with Alan Cox patch (which contains the ITE 8212 drivers) and with yestoall switch (I couldn't figure out the right combination of 'M's, 'Y's and 'N's). It is up and working though a lot inefficient and doesn't have alsa or X in working condition. Now I wanna try out LFS too. So I decided to use this semi-god-of-an-OS as my host and started.

Honestly I don't know much about linux. I don't change them knowing the merits and demerits or anything. There is a way to get something done in everything. I wanted a good one. I thought slack is so down to earth that I can do anything I want with a few config files. The hard part comes in finding them. So I thought if in LFS I build everything from scratch, I place the things where they belong and have better chance of knowing what is where.

Any how I started with the LFS 6.1 and intentionally omitted ALFS. I followed the instructions in chapter and worked till the linux kernel in chapter 8. Then came the problem. Again the same NYM. argh.. any how I did a better job than earlier and got a working kernel. I didn't even have to patch this one. I don't know when it started but 2.6.13.4 has ITE 8212 drivers built into it. *Yeah I deviated from book and went ahead with the latest kernel.* The instructions in book are not much dependent on kernel version and that's the last one to be compiled. so I figured no probs would come.

There are still a few probs. I used udev and hadn't configured /etc/modprobe.conf. I guess most of the probs are due to this. But what matters is my LFS box works.

  • kernel boot option vga=791 won't work. Probably fbdev problem. But I compiled it into the kernel, not as module.
.config

Shall upload later

Wednesday, May 11, 2005

Driver source don't compile

throws some error. shall post the complete error log later. for now see if any one can compile them successfully on stock kernal. Please let me know if you are successful.

Here is the link http://www.ite.com.tw/software_download/software_download2.asp#IT8212%20ATA133%20Controller

Tuesday, May 10, 2005

It's here

Finally started with a blog to post my projects so that I can have a log of my screw ups and get help from people.

Right now my project is to install linux on my pc, slackware 10. ah! that would be easy you say. But what if I say I have to install it on raid 0(striping) on ITE 8212f controller without actuallly loosing the data on other partitions and espetially without a working linux environment. Now thats' a chicken and egg problem. I won't have an up and running linux unless I have the drivers for raid and I can't compile the drivers without working linux.

The big idea on my mind is linux on virtual mechine(b4 I 4gt, thanks kousik). shall let you know aout it in short while. my dial up is way too slow to post regular updates. So, I'll post 'em when ever my net connects and stays live for a while.