site  contact  subhomenews

Compiling 2.6.29-rc7

March 09, 2009 — BarryK
I got a sudden urge to compile a kernel. I am intrigued that Squashfs has finally made it into the kernel. So, I downloaded the source, but found that Aufs does not yet compile with the 2.6.29 kernel -- Unionfs on the other hand does, so I have gone for that.

I was thinking about the maximum number of loop devices -- now that I want to find it, I can't locate where the guys were discussing that. Did they patch the kernel sources? -- well, I looked at drivers/block/loop.c and it has these comments:

 * Maximum number of loop devices now dynamic via max_loop module parameter.

* Russell Kroll <rkroll@exploits.org> 19990701
*
* Maximum number of loop devices when compiled-in now selectable by passing
* max_loop=<1-255> to the kernel on boot.
* Erik I. Bolsų, <eriki@himolde.no>, Oct 31, 1999

* Support up to 256 loop devices
* Heinz Mauelshagen <mge@sistina.com>, Feb 2002

/*
* loop module now has a feature to instantiate underlying device
* structure on-demand, provided that there is an access dev node.
* However, this will not work well with user space tool that doesn't
* know about such "feature". In order to not break any existing
* tool, we do the following:
*
* (1) if max_loop is specified, create that many upfront, and this
* also becomes a hard limit.
* (2) if max_loop is not specified, create 8 loop device on module
* load, user can further extend loop device by create dev node
* themselves and have kernel automatically instantiate actual
* device on-demand.
*/


So, it appears no patch is required. All that has to be done is manually create more /dev/loop* nodes.

Comments

loop devices
Username: Leon
Barry, I'm using 23 SFS files in Puppy 4.1.2 for a few months now without any noticeable performance decrease. Aufs allows it without any problem. You can look at my implementation in the Puppy 4.1.2 'init' script. Just search for string 'LZ' in it. Download: Load up to 24 SFS files in Puppy 4.1.2 http://www.murga-linux.com/puppy/viewtopic.php?t=36733 - initrd.gz for puppy-4.1.2retro-k2.6.21.7 - Downloaded 77 Time(s) - initrd.gz for puppy-4.1.2-k2.6.25.16 - &#65279;Downloaded 160 Time(s) I did't noticed any complaints yet. The menu.lst file for frugal install using Grub4Dos: # Boot Puppy Linux title Puppy-4.12.25, 24, idehd, p41225, 524288 rootnoverify (hd0,4) kernel /p41225/vmlinuz pfix=fsck max_loop=28 pmedia=idehd psubdir=p41225 ramdisk_size=524288 initrd /p41225/initrd.gz boot For more discussions see: LighthousePup 4.1.2 Beta 4 198M - Up to 24 SFS Files http://www.murga-linux.com/puppy/viewtopic.php?t=38898&start=15 Unnamed puplet 1.1 (puppy411 kernel-2.6.28.5 Xorg-7.4 LXDE) http://www.murga-linux.com/puppy/viewtopic.php?t=39154 live mounting of sfs is it possible ? http://www.murga-linux.com/puppy/viewtopic.php?t=37913 Load up to 20 extra SFS's in Puppy 4.1.1 http://www.murga-linux.com/puppy/viewtopic.php?t=35266

Kernel sources /config
Username: helander
"I am very interested in using woof together with a kernel with preemption configured. Since it is just a matter of changing a single config parameter, I can easily do that and build my own kernel, but that would be very much simpler if it was possible to get access to your kernel build (sources and/or description). Do you think you will abandon aufs for good or revert back once it becomes available? /Lars

Compiling kernel
Username: Leon
"Barry, 1. Number of loop devices Would it be possible to adjust the number of loop devices in 'init' script according to the list of sfs filenames in /etc/rc.d/BOOTCONFIG file? 2. Non-us filename characters in Rox We discussed this theme on your blog: Choose-locale script defaults non-UTF8 http://bkhome.org/archive/blog2/200902/choose-locale-script-defaults-non-utf8.html Forum member 'wow' kindly explained how to enable non-us characters in filenames to be shown properly in Rox. http://www.murga-linux.com/puppy/viewtopic.php?t=36592&start=210 Easy: Full install You have to compile your own kernel with these options in "DOS/FAT/NT Filesystems"(kernel's .config file): Code: CONFIG_FAT_DEFAULT_CODEPAGE=850 CONFIG_FAT_DEFAULT_IOCHARSET="utf8" Install and boot your kernel. Hard: Full install, initrd.gz and pup_4xx.sfs edit, remaster LiveCD. Compile linux kernel with these options in "DOS/FAT/NT. Filesystems"(kernel's .config file): Code: CONFIG_FAT_DEFAULT_CODEPAGE=850 CONFIG_FAT_DEFAULT_IOCHARSET="utf8" Install and boot your kernel. Extract contents of initrd.gz and replace every kernel module in initrd/kernel/. Add nls_utf8.ko and nls_cp850.ko files to initrd/kernel/fs/nls/. Replace names(nls_cp850 and nls_utf8) in initrd/init (text file). Instructions to edit the initrd.gz file, patch the linux kernel, make an iso with your new kernel. More help: http://www.murga-linux.com/puppy/viewtopic.php?p=234637#234637 http://www.murga-linux.com/puppy/viewtopic.php?p=239056#239056 http://www.murga-linux.com/puppy/viewtopic.php?t=34341

loop.c
Username: MU
"The older ones just activated 8 devices, what could be overridden by a parameter passed to the kernel. To avoid the need of the parameter, I patched loop.c like this: around line 1524: if (max_loop) { nr = max_loop; range = max_loop; } else { nr = 99; range = 1UL << (MINORBITS - part_shift); } You just need to modify initrd.gz in addition, to deal with the additional loop devices. I posted my first experiences here: http://murga-linux.com/puppy/viewtopic.php?t=34341&start=75 Meanwhile this small change has proven to run stable in several different kernels (2.6.25.16, 2.6.27, 2.6.27.5, 2.6.28.5). Mark

sfs on the fly
Username: technosaurus
"it is possible to create loops on the fly just before mounting the sfs file see the script at post here http://www.murga-linux.com/puppy/viewtopic.php?t=37913 no need to make any init changes really except maybe to [b]remove[/b] those that aren't used already by default ... slax has been doing it for a while already and now using lzma could also simplify the boot manager to call this script

2.6.29 kernel
Username: BarryK
"[i]Do you think you will abandon aufs for good or revert back once it becomes available?[/i] I'm only playing, getting some experience with this new kernel. I also am interested in evaluating the latest unionfs. I think MU mentioned in the forum that the new Squashfs 4.0 can't load older squashfs files. Hmm, yes, I just discovered that -- now I have to go and find a 'mksquashfs' for 4.0. Leon, thanks for all the feedback and links.

mksquashfs 4.0
Username: BarryK
"Have to get it out of cvs. For the record, for anyone else who wants to compile the 2.6.29 kernel: http://sourceforge.net/cvs/?group_id=63835 # cvs -d:pserver:anonymous@squashfs.cvs.sourceforge.net:/cvsroot/squashfs login (enter only for password) # cvs -z3 -d:pserver:anonymous@squashfs.cvs.sourceforge.net:/cvsroot/squashfs co -P squashfs


Tags: woof