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 <> 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ų, <>, Oct 31, 1999

* Support up to 256 loop devices
* Heinz Mauelshagen <>, 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.


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 - 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 Unnamed puplet 1.1 (puppy411 kernel- Xorg-7.4 LXDE) live mounting of sfs is it possible ? Load up to 20 extra SFS's in Puppy 4.1.1

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 Forum member 'wow' kindly explained how to enable non-us characters in filenames to be shown properly in Rox. 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:

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: Meanwhile this small change has proven to run stable in several different kernels (, 2.6.27,, 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 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: # cvs login (enter only for password) # cvs -z3 co -P squashfs

Tags: woof