LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-29-2008, 11:54 AM   #1
buaku
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2 (2.4.31)
Posts: 111

Rep: Reputation: 15
Slackware 12.1 and linux live scripts problems


I thought it'd be fun to try and make my own live cd, so I installed Slackware 12.1 and the linux live scripts.

I made my aufs and squashfs w/LZMA modules and followed the instructions and did some patching.

The aufs and squash modules load just fine on my running system, so that was encouraging.

I ran the build scripts and generated an iso, but when I boot the iso I keep getting errors not matter what stuff I try.

Here's the 2 errors I'm getting:
Code:
Mounting fuse control filesystem failed!
and then the really bad one...
Code:
Checking root filesystem:
fsck 1.4.8 (13-Mar-2008)
Remounting root device with read-write enabled.
/etc/mtab: Permission denied
then it spews out a bunch of info telling me this failure is going to cause serious problems.

I've looked at the initrd image and the running system and the perms look fine for /etc/mtab, so I have no clue what's going on.

Anyone have any idea what could be causing this?
 
Old 06-30-2008, 11:32 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,401
Blog Entries: 3

Rep: Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483
Hi,

You should look at 'Cooking Up Some Slack. (CUSS)'.

This link and others are available from 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 07-01-2008, 11:14 PM   #3
buaku
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2 (2.4.31)
Posts: 111

Original Poster
Rep: Reputation: 15
Cool, I'll check em out!

Well I tried a lot of other things after this post and eventually got another error saying mount.aufs was crapping out. So I compared some of my system files to the ones that are a part of Slax and Slax didn't have a mount.aufs. So I took the file out and it started to work!

Now I'm trying the whole thing from scratch to see if I can get it right w/out running into any errors.
 
Old 07-02-2008, 02:59 AM   #4
Camarade_Tux
LQ Newbie
 
Registered: Dec 2007
Location: Paris
Distribution: Slackware-current
Posts: 27

Rep: Reputation: 15
I've just finished a bunch of scripts which automate the whole process of making a livecd from these scripts (adds some apps, compiles and installs a shiny new kernel, gets rid of unuseful files that take space, and so on). They're not published yet as they need some polishing but they're almost bug free (set -o pipefail; set -o nounset; set -o errexit are great !) and certainly cause less bugs than humans.

If such scripts were available, would you use them ?
I'm just wondering whether there will be some people using these scripts, nothing more.
 
Old 07-02-2008, 06:10 PM   #5
buaku
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2 (2.4.31)
Posts: 111

Original Poster
Rep: Reputation: 15
I'd probably use them or at least use them as a starting point to understand what's going on.
If nothing else it's always nice to have an example of something done right, even if you're trying to do it manually.

What's currently getting me with the live scripts is using his Makefile to build the squashfs and lzma parts.
It always fails trying to compile in like squashfs3.3/kernel-patches/<kernelver>/fs/squashfs.

Nothing in the instructions ever seemed to mention having source files in that directory and it doesn't look like any of the scripts put files in there. So I just end up copying the files over from /usr/src/<kernelver>/fs/squashfs. It's odd because the script somehow makes the kernel-patches/<kernelver>/fs/squashfs, but doesn't put anything in there.
 
Old 07-02-2008, 07:37 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,401
Blog Entries: 3

Rep: Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483Reputation: 1483
Hi,
Quote:
Originally Posted by Camarade_Tux View Post
I've just finished a bunch of scripts which automate the whole process of making a livecd from these scripts (adds some apps, compiles and installs a shiny new kernel, gets rid of unuseful files that take space, and so on). They're not published yet as they need some polishing but they're almost bug free (set -o pipefail; set -o nounset; set -o errexit are great !) and certainly cause less bugs than humans.

If such scripts were available, would you use them ?
I'm just wondering whether there will be some people using these scripts, nothing more.
I'm game! Post a link to let us see them.
 
Old 07-03-2008, 09:22 AM   #7
Camarade_Tux
LQ Newbie
 
Registered: Dec 2007
Location: Paris
Distribution: Slackware-current
Posts: 27

Rep: Reputation: 15
Quote:
Originally Posted by buaku View Post
I'd probably use them or at least use them as a starting point to understand what's going on.
If nothing else it's always nice to have an example of something done right, even if you're trying to do it manually.

What's currently getting me with the live scripts is using his Makefile to build the squashfs and lzma parts.
It always fails trying to compile in like squashfs3.3/kernel-patches/<kernelver>/fs/squashfs.

Nothing in the instructions ever seemed to mention having source files in that directory and it doesn't look like any of the scripts put files in there. So I just end up copying the files over from /usr/src/<kernelver>/fs/squashfs. It's odd because the script somehow makes the kernel-patches/<kernelver>/fs/squashfs, but doesn't put anything in there.
I've had the same problem and this has been one of my motives. What I've basically done with the kernel part, was to rewrite what was already provided. However my script is much much more robust and you shouldn't have troubles.
I've tarred a part of it and you can grab it there : http://pers.yaxm.org/temp/llama-0.1-part.tar.gz

Let's call ROOT_DIR the tarball root.

You should edit $ROOT_DIR/config/make-llama-config first.
SLACK_SRC is the location of a (local) slackware source. It is used to get the kernel source (the kernel source must be a slackware package !). You can also
Code:
mkdir -p $ROOT_DIR/srcs/kernel
( cd $ROOT_DIR/srcs/kernel && wget http://ftp.lip6.fr/pub/linux/distributions/slackware/slackware-current/slackware/k/kernel-source-2.6.24.5_smp-noarch-2.tgz )
(other sources are automatically downloaded)

You may also change the TMP variable. A tmpfs does not necessarily speed the compilation but it certainly speeds the kernel decompression so it is a good idea to use one. Note that you will need 550MB available.

You can change MAKE_CMD to "make -S" or simply "make" if you want the compilation to be a bit less quiet.
TUNE_FLAGS and OPTIMIZE_4_SIZE are used for src2pkg which is not used in this releas so don't care about them. Same applies for OCAML_PREFIX.

Last, there is my own kernel configuration at config/kernel.config. It's not perfect so you may want to check it (it should build ext2/3, xfs, reiserfs,jfs support in the kernel though). I made it because linux-live gives support for things such as token rings...
The kernel will be automatically installed at the end of the compilation. To disable this, change the last two lines at the end of $ROOT_DIR/creation-scripts/linux-live/build-lama-kernel.sh.


Now, issue $ROOT_DIR/creation-scripts/make-llama.sh.
You will be asked something about the kernel configuration and squashfs, answer N (it's the default anyway). I perfectly know the root of the problem but had no clean and sexy solution until now.


[1] in fact I also wrote a script which creates a 300MB slackware iso to get an even lighter slackware so I can expect the slackware source to be available




Quote:
Originally Posted by onebuck View Post
Hi,


I'm game! Post a link to let us see them.
Just give me a few days to have something really releasable. Probably this week-end.
 
Old 07-04-2008, 01:00 AM   #8
buaku
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2 (2.4.31)
Posts: 111

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Camarade_Tux View Post
I've had the same problem and this has been one of my motives. What I've basically done with the kernel part, was to rewrite what was already provided. However my script is much much more robust and you shouldn't have troubles.
I've tarred a part of it and you can grab it there : http://pers.yaxm.org/temp/llama-0.1-part.tar.gz
Those are a pretty impressive set of scripts there!

I found in your build-lama-kernel.sh where you change the provided linux-live Makefile. That appears to be just what I needed to build squashfs without getting an error the first build attempt! Thanks!!
Now that the paths were shorter I noticed I was getting some warnings during the "MODPOST 1 modules" portion of the build right after it says "Building Modules, stage 2"..
It's saying sqlzma_fin, sqlzma_un, and sqlzma_init are undefined in squashfs.ko, but the kernel module loads anyway after the build is complete.

Did you encounter that issue at all?

I don't really understand the module building process at all, so I'm not sure what's going on during that part of the build process.

I investigated further and it turns out if I don't have sqlzma.ko and unlzma.ko available and I try to insert squashfs, I get an error saying sqlzma_fin, sqlzma_un, and sqlzma_init are unknown symbols when I check out 'dmesg'. I'm guessing when squashfs.ko is being built those other modules don't exist yet and they can't provide those symbols to the squashfs module, so it gives that warning to me.


Do you deal with fsck.aufs in your scripts at all? My latest try at a live CD says it can't fsck the drive because it can't find fsck.aufs.
I did see where you copy the man page over though.

The first time I tried building my Live CD I did the recommended install command the aufs docs talk about.
Code:
 # install -m 500 -p mount.aufs umount.aufs auplink aulchown /sbin (recommended)
Unfortunately I think this was the root cause of my problems on my first Live CD. After clearing up my mtab error I was getting mount.aufs errors. Once I took that file out of my Live CD, it booted just fine. The Slax CD doesn't have that mount.aufs file either, so that's why I tried removing it from my Live CD.

I figure an fsck isn't all that important since nothing can be saved back to the CD. It's like a brand new filesystem each time you run it!


Oh one more thing I wanted to mention is an issue I encountered getting networking to work on the Live CD. Whenever I would boot my CD it would say eth0 was renamed to eth1 by udev. I investigated this and I think this is because I built my Live CD from my current install. What happens is udev creates a rule for the network interface and binds it to the MAC address of the network card and saves it to a rule. This way if you have multiple NICs in a machine they'll always get the same device assigned to them, so as not to mess up anything dependent on their device name. So now when I boot the Live CD on another machine the network card's MAC address doesn't match the existing rule, so it makes a new rule and finds a new ethX to use. This would cause issues because eth1 isn't configured on bootup, so I wouldn't get an internet connection. My solution was to add "/etc/udev/rules.d/70-persistent-net.rules" to the list of excluded files in the linux-live scripts .config file. The way I understand it 75-persistent-net-generator.rules will generate that file or update it on each run.
Now since 70-persistent-net.rules isn't included on the CD it will be like a brand new install and whatever network card is in there will be like the first card it's ever seen, so it will get eth0! I guess the only downside is if you use the Live CD on a machine with multiple network cards their order may not be guaranteed from reboot to reboot.
From my searching it seems there are other ways to assign the device names, like using PCI Bus ID or something, but I guess even that could have issues when going between wildly different hardware.

Hope this post is understandable...I'm tired, but I wanted to get everything written down before I forgot :P
 
Old 07-04-2008, 04:32 PM   #9
Camarade_Tux
LQ Newbie
 
Registered: Dec 2007
Location: Paris
Distribution: Slackware-current
Posts: 27

Rep: Reputation: 15
Quote:
Originally Posted by buaku View Post
Those are a pretty impressive set of scripts there!

I found in your build-lama-kernel.sh where you change the provided linux-live Makefile. That appears to be just what I needed to build squashfs without getting an error the first build attempt! Thanks!!
Now that the paths were shorter I noticed I was getting some warnings during the "MODPOST 1 modules" portion of the build right after it says "Building Modules, stage 2"..
It's saying sqlzma_fin, sqlzma_un, and sqlzma_init are undefined in squashfs.ko, but the kernel module loads anyway after the build is complete.

Did you encounter that issue at all?
It's absolutely not a problem. This happens if the lzma module is not loaded during compilation. There would be a problem if the lzma module were unavailable during boot but modprobe takes care of this and the linux-live's ./build would fail if it couldn't copy the corresponding module.


Quote:
I don't really understand the module building process at all, so I'm not sure what's going on during that part of the build process.

I investigated further and it turns out if I don't have sqlzma.ko and unlzma.ko available and I try to insert squashfs, I get an error saying sqlzma_fin, sqlzma_un, and sqlzma_init are unknown symbols when I check out 'dmesg'. I'm guessing when squashfs.ko is being built those other modules don't exist yet and they can't provide those symbols to the squashfs module, so it gives that warning to me.
I have to say I'm a bit surprised because it seems to be possible to build a module kernel without its having built its dependancies first. I guess that if it's the case, it's specific to the kernel.
Don't forget that modprobe will always try to load the lzma modules before loading the squashfs one.


Quote:
Do you deal with fsck.aufs in your scripts at all? My latest try at a live CD says it can't fsck the drive because it can't find fsck.aufs.
I did see where you copy the man page over though.
Well, I wasn't even aware such a file existed and in fact it surprises me. I don't really understand what could be checked in an union because the filesystem does not exist when it's not mounted ! I don't know if I have such a file so I'll check it (I can't right now);

Quote:
The first time I tried building my Live CD I did the recommended install command the aufs docs talk about.
Code:
 # install -m 500 -p mount.aufs umount.aufs auplink aulchown /sbin (recommended)
Unfortunately I think this was the root cause of my problems on my first Live CD. After clearing up my mtab error I was getting mount.aufs errors. Once I took that file out of my Live CD, it booted just fine. The Slax CD doesn't have that mount.aufs file either, so that's why I tried removing it from my Live CD.
I had several problems but don't think I ever had that one. Maybe you had several mount.aufs which were conflicting but that's just an hypothesis.

Quote:
I figure an fsck isn't all that important since nothing can be saved back to the CD. It's like a brand new filesystem each time you run it!
And you can run as root all the time.
(except that some apps display that pestering superuser warning...)


Quote:
Oh one more thing I wanted to mention is an issue I encountered getting networking to work on the Live CD. Whenever I would boot my CD it would say eth0 was renamed to eth1 by udev. I investigated this and I think this is because I built my Live CD from my current install. What happens is udev creates a rule for the network interface and binds it to the MAC address of the network card and saves it to a rule. This way if you have multiple NICs in a machine they'll always get the same device assigned to them, so as not to mess up anything dependent on their device name. So now when I boot the Live CD on another machine the network card's MAC address doesn't match the existing rule, so it makes a new rule and finds a new ethX to use. This would cause issues because eth1 isn't configured on bootup, so I wouldn't get an internet connection. My solution was to add "/etc/udev/rules.d/70-persistent-net.rules" to the list of excluded files in the linux-live scripts .config file. The way I understand it 75-persistent-net-generator.rules will generate that file or update it on each run.
Now since 70-persistent-net.rules isn't included on the CD it will be like a brand new install and whatever network card is in there will be like the first card it's ever seen, so it will get eth0! I guess the only downside is if you use the Live CD on a machine with multiple network cards their order may not be guaranteed from reboot to reboot.
From my searching it seems there are other ways to assign the device names, like using PCI Bus ID or something, but I guess even that could have issues when going between wildly different hardware.
I never had the time to learn more about udev. In fact, since it is hard to get wireless working under linux, I started something around ndiswrapper which create an alias to wlanX (and since there's almost no computer with several wireless cards, wlan0 is your wireless card). There's a great windows project called driverpacks which gathers all drivers. I wrote a program which can find the proper driver and install it through ndiswrapper, I just need to remember where I've put it. :P
Anyway, I'll try that udev thing soon. Thanks for the tip.

Last edited by Camarade_Tux; 07-04-2008 at 04:32 PM. Reason: syntax
 
Old 07-05-2008, 12:25 AM   #10
buaku
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2 (2.4.31)
Posts: 111

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Camarade_Tux View Post
It's absolutely not a problem. This happens if the lzma module is not loaded during compilation. There would be a problem if the lzma module were unavailable during boot but modprobe takes care of this and the linux-live's ./build would fail if it couldn't copy the corresponding module.

I have to say I'm a bit surprised because it seems to be possible to build a module kernel without its having built its dependancies first. I guess that if it's the case, it's specific to the kernel.
Don't forget that modprobe will always try to load the lzma modules before loading the squashfs one.
That's good to know. I had a hunch that was the reason, but I like to have confirmation.


Quote:
Well, I wasn't even aware such a file existed and in fact it surprises me. I don't really understand what could be checked in an union because the filesystem does not exist when it's not mounted ! I don't know if I have such a file so I'll check it (I can't right now);
The Slax distro had it, so that's why I included it in mine. Without it I get a warning when the system is booting saying it can't find that file in order to fsck the drive. When you get a chance take a look as your Live CD is booting.
It happens for me a little after the triggering udev events part, like right after the linux-live scripts end and it starts up the distro.


Quote:
I had several problems but don't think I ever had that one. Maybe you had several mount.aufs which were conflicting but that's just an hypothesis.
Yeah I have no idea. There's lots of other mount.* files, but as long as I don't have mount.aufs all is well.
I just did a little searching and it turns out someone else had this issue. This thread talks about it and has the exact same issues I had:
http://www.mail-archive.com/aufs-use.../msg00061.html
According to that last post I guess it's not needed, and I think that dude may be the author of aufs. It's always nice to know why things happen!


Quote:
I never had the time to learn more about udev. In fact, since it is hard to get wireless working under linux, I started something around ndiswrapper which create an alias to wlanX (and since there's almost no computer with several wireless cards, wlan0 is your wireless card). There's a great windows project called driverpacks which gathers all drivers. I wrote a program which can find the proper driver and install it through ndiswrapper, I just need to remember where I've put it. :P
Anyway, I'll try that udev thing soon. Thanks for the tip.
I still don't know much about udev, just what little I read trying to solve my network issue. Now that's one thing I've never messed with is wireless cards in Linux. I still prefer to keep things wired because it's easier, lol.

One more thing I notice on boot is message saying "Mounting fuse control filesystem failed!" This seems to go away if I don't let rc.fuse execute on the Live CD. Not sure if this is important or not.
The fuse module appears to load either way when I check it with lsmod.
I know the Slax distro doesn't have an rc.fuse in it's /etc/rc.d dir, yet the fuse module get's loaded just fine anyway.

Even with these warning and issues on bootup the Live CD seems to run! I figure it's a lot of trial and error and just seeing what works and what doesn't. It's fun stuff and a great learning experience.
Hopefully this thread will help others out. I know its been great having someone to bounce ideas off of, so thanks for that!
 
Old 07-06-2008, 10:03 AM   #11
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,280

Rep: Reputation: 61
Sorry I did see this post a lot sooner, I build a few live distro projects myself built from slackware 12. If you still have trouble I can spend some time and create a compress the built directory which already has a precompiled kernel ( 2.6.24-rc3 )and all the scripts to build a live cd from the prebuilt packages from the slackware 12 DvD. I have used this for over 3 years now and it works perfectly.
 
Old 07-06-2008, 01:26 PM   #12
buaku
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2 (2.4.31)
Posts: 111

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by fotoguy View Post
Sorry I did see this post a lot sooner, I build a few live distro projects myself built from slackware 12. If you still have trouble I can spend some time and create a compress the built directory which already has a precompiled kernel ( 2.6.24-rc3 )and all the scripts to build a live cd from the prebuilt packages from the slackware 12 DvD. I have used this for over 3 years now and it works perfectly.
Not a problem and thanks for the offer! I think I've got my issues worked out. The CD boots and I can log in and do things, so I think it's working pretty well. Now I'm just tweaking things here and there like preventing the thing from automounting my NTFS partitions.

I'm going to tweak the isolinux.cfg file and give me a few more menu options. At least one to automount and one to not automount.
 
  


Reply

Tags
aufs, fuse


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Live Scripts - X and mouse problem SJD Slackware 1 05-29-2007 01:22 PM
Linux-Live scripts... help? pengu Linux - Software 5 01-18-2007 02:11 AM
slax live-linux scripts problem v2lk Linux - Software 0 04-21-2004 06:03 AM
Sound problems on Slackware 9.1/SB Live Platinum bjgopinath Linux - Hardware 0 04-03-2004 10:15 AM
Creative SB Live! 5.1 Digital + Slackware 9.1 = Problems, Help, pls! vertrygen Slackware 2 12-03-2003 07:47 AM


All times are GMT -5. The time now is 02:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration