LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Grub - How to Add Module? (https://www.linuxquestions.org/questions/debian-26/grub-how-to-add-module-933890/)

Quantumstate 03-11-2012 09:45 AM

Grub - How to Add Module?
 
I have a system installed on a BTRFS partition. I am trying to transition from a custom kernel to the standard one, but it keeps booting into initramfs. I suspect it does not have the BTRFS module which is needed.

I've researched and cannot figure out how to do this in this newfangled grub2. There is a btrfs.mod in /boot/grub but I don't know how to invoke it. And I can no longer find any evidence that mkinitrd exists.

How is this done now?

syg00 03-11-2012 08:23 PM

"insmod btrfs" ?.
Looks like it should work, but I don't know if all the functionality is supported (subvolumes especially), so I keep the separate ext4 /boot out of habit.

Quantumstate 03-11-2012 11:26 PM

Thanks, but can't do that while booting.

I thought maybe adding it to /etc/initramfs-tools/modules and update-initramfs, but nope, no improvement.

widget 03-11-2012 11:47 PM

It would help to know the version of Debian, the kernel and the version of grub.

Btrfs is supposed to be supported in the newer versions. I have my doubts that it is well supported yet.

My wheezy install running 1.99-14 has a /boot/grub/btrfs.mod file but that doesn't mean it works.

I have never run btrfs myself but always recommend the use of a separate /boot partition formatted to something well supported.

Have heard of folks that had no trouble at all with a default install of testing. Not often.

syg00 03-11-2012 11:56 PM

Quote:

Originally Posted by Quantumstate (Post 4624425)
Thanks, but can't do that while booting.

That's a grub insmod command, not a Linux kernel module loader. Add it to grub.cfg - preferably via a custom entry and rebuild the cfg.

Quantumstate 03-12-2012 07:54 AM

Running the current Testing with custom kernel 3.0.0, trying to transition to regular Debian kernel 3.2. Grub 1.99-17.

Yes I have the BTRFS module in /boot/grub, but the problem is loading it which I do not think is happening. I experimented with BTRFS on this machine, and it's a real hassle to rebuild. When I do rebuild I won't use it, as it's not ready for prime time. For now I need to transition kernels.

Thanks syg00, I did it the proper way and added insmod btrfs to /etc/grub.d/40_custom and update-grub. It did indeed add it to grub.cfg. I'll test it tonight. Must go to work now.

widget 03-12-2012 03:07 PM

That looks like the way to go.

However, before giving it a whack, add this type of entry to your 40_custom file, edited to your box and adding your additions to the instruction string along with the other appropiet things depending on the format used in your script.
Code:

menuentry "Squeezy on sda7" {
    set root=(hd0,7)
        linux /vmlinuz root=/dev/sda7 ro quiet
        initrd /initrd.img
}

This is a symbolic menu entry. It just calls for the newest Debian based kernel in the defined partition. Do not know if it will help but it might if the one you are using (10_linux generated and then modified) does not.

Quantumstate 03-12-2012 10:47 PM

my simple insmod doesn't work. I'll try yours tomorrow widget.

widget 03-13-2012 12:49 AM

It is simply grasping at straws. Not sure why the btrfs support is so spotty. Seems to work for some folks.

Has to be hardware related in some manner.

Could be down to a hardware matter with a half baked fs. May be that it works better on some hardware than others. Hopefully it will be stable someday soon.

I haven't tried it yet. Want to but I really would rather wait until it works with grub in some reliable way.

Quantumstate 03-13-2012 09:02 AM

Same hardware I've had for years running Debian. 3.0.0 custom kernel runs fine. (BTRFS module compiled in) I tried BTRFS on a number of machines on the theory that after several years of development it should be fine. I was wrong. Now I only run it on this machine (leftover legacy) and my backup server. BTRFS is marvelous for backups with its snapshotting, and I use the server to back up all my machines with rsync through an SSH tunnel.

I thought BTRFS would be farther along by now. In retrospect I should have stuck with ZFS through FUSE.

It may be that I just have to do a complete reinstall. The machine in question is my home theater PC, and a rebuild would take days so I've been reluctant as I lose TV.


All times are GMT -5. The time now is 06:35 AM.