Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Friday October 04, 2002
07:47 AM

Upgrading debian's kernel and filesystems

[ #8170 ]

I used RedHat 7.2 just before I started using Debian. There were three things about RedHat I liked that Debian didn't have by default:

  • grub
  • Linux, the kernel, version 2.4
  • ext3fs

Now, I could have gotten all of those by compiling them myself, and I'm no stranger to doing that. But I knew the 2.4 kernel was in the available Debian packages, and I wanted to find out how to do it that way. (Imagine being in a state where installing a precompiled package is harder for you than compiling yourself. Happens to me all the time. :) )

So yesterday I finally figured out how to do it. To upgrade the kernel:

  • Pick a kernel image from the available options; doing something like apt-cache dumpavail | grep '^Package: kernel-image'
  • apt-get install kernel-image-2.4...
  • You will probably be prompted to set up initrd in lilo.conf; add lines like initrd=/initrd
  • Your old kernel will be moved to /vmlinuz.old, which you can boot by pressing TAB at lilo and selecting LinuxOLD. Aren't you lucky? You may need this.
  • apt-get will prompt you to see if you want to install a new lilo loader or not. Say yes. (Just think; if you used grub, you wouldn't have this decision.)
  • Reboot and feel the love. (That sounds like an IBM commercial...)
  • Any number of things may work differently, particularly as regards modules. My network driver doesn't load on its own now, so I am currently starting networking by hand (I'll figure this out some day) with modprobe pcnet32; /etc/init.d/networking restart

That got me a working 2.4 kernel. :)

To turn on ext3fs:

  • Don't plan on turning on ext3fs for the root or /boot partitions. You won't have the driver compiled into your kernel; it has to load dynamically (which means it is unavailable when you need to mount those partitions, and you can't load it because they are unmounted). Recompile your own kernel and include ext3fs if you want that.
  • I used the "Beyond Linux From Scratch" instructions (link will probably move) as a base, but changed some things, and learned some things.
  • For each partition you would like to be ext3, change "ext2" (or whatever) on that line in /etc/fstab to "auto." You can also say "ext3," but "auto" gives you some chance of mounting the partition as an ext2 if the kernel doesn't actually include ext3 when you thought it did. (I still don't think you should try this for / or /boot.)
  • Also on those lines in /etc/fstab, change the final field to a 0. This says not to fsck that partition on boot.
  • Unmount the appropriate partitions. Try a straight umount command, first. (Oh, you are in single user mode, aren't you? I upgraded /home in multiuser mode, but this machine is on my desk and I was logged in on the text console only as root, so I knew /home wouldn't be in use. /usr and /var weren't so lucky.) If the umount fails, try umount -r and then umount -l. If you have to use these switches, you will probably have to reboot when you are done rather than just going back to multiuser mode.
  • If you did something stupid and umounted your /usr before you edited /etc/fstab, you might have to do something nasty like edit it with ed. I am now a real sysadmin, by the way. :)
  • For each filesystem you're upgrading, run tune2fs -j /dev/hda7 or whatever device it's on.
  • mount -a unless you had to use umount -l, in which case you should reboot.

Looks like it all works for me. Now to figure out grub. And to try this on my blueberry ibook. (I tried to compile my own 2.4 kernel for this in January and it ate my filesystem. I was frantically trying to fsck and recover while watching figure skating. I failed.)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Now that apt-rpm is really very stable, I can see no technological reason whatsoever for using Debian. The only reason that remains seems to be social.

    Ooh, now I bet that stirs up a hornet's nest ;-)
    • Not with me. I'm thinking of turning one of my boxes at home into an apt-rpm system.

      I've also been wanting to build a Linux From Scratch [linuxfromscratch.org] system but build rpms, maybe even host my own little mini repository and try to install from it onto another machine.

      I like RedHat. I also like Debian. My friends had a hard time getting me off RedHat onto Debian, but apt finally won out. At the moment, I'd have to say I trust the apt infrastructure for Debian more than I do for rpm systems: I expect it to be more

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
      • Actually I lied. There is one thing that the debian system has over redhat in regards to package management: suggests.

        i.e. AxKit doesn't *need* XML::LibXML or XML::Sablotron or XML::Parser of any of that crap, but it does suggest you get them otherwise it's pretty functionless without them.

        RPM can't encode that relationship as far as I can tell, but debian's package system can.
        • They can encode it, but in my experience it hasn't been used to its fullest potential. I went through the other day and tried to delete a lot of things I didn't want or need. One item I found was an ASCII art package. Couldn't uninstall it because GIMP has it as a dependency. I'm sure it's not used every time I run GIMP, so there's a prime example of something that would work better as a suggestion.

          --
          J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers