LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-11-2012, 09:45 AM   #1
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Rep: Reputation: 22
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?
 
Old 03-11-2012, 08:23 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
"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.
 
Old 03-11-2012, 11:26 PM   #3
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Original Poster
Rep: Reputation: 22
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.
 
Old 03-11-2012, 11:47 PM   #4
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
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.
 
Old 03-11-2012, 11:56 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by Quantumstate View Post
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.
 
Old 03-12-2012, 07:54 AM   #6
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Original Poster
Rep: Reputation: 22
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.
 
Old 03-12-2012, 03:07 PM   #7
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
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.
 
Old 03-12-2012, 10:47 PM   #8
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Original Poster
Rep: Reputation: 22
my simple insmod doesn't work. I'll try yours tomorrow widget.
 
Old 03-13-2012, 12:49 AM   #9
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
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.
 
Old 03-13-2012, 09:02 AM   #10
Quantumstate
Member
 
Registered: Jun 2005
Location: Seattle, Ecotopia
Distribution: CentOS 7.4 with KDE
Posts: 262

Original Poster
Rep: Reputation: 22
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.
 
  


Reply



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
[SOLVED] how to configure grub to add windowXP to grub list. jazzsir Debian 4 09-03-2011 07:02 PM
LXer: Grub Customizer Lets You Reorder, Add Or Remove GRUB 2 (Or BURG) Menu Entries LXer Syndicated Linux News 0 10-09-2010 05:20 PM
How to add my own module? aarsh Linux - Newbie 2 04-28-2010 03:33 AM
how to add a module abd_bela Linux - Hardware 1 10-25-2003 02:26 AM
how to add a new module abd_bela Linux - Hardware 1 09-12-2003 01:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:00 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration