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

Notices


Reply
  Search this Thread
Old 11-25-2014, 06:01 PM   #1
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Question BtrFS on /(root) issue.


Okay, I'm not sure how this happened today, but I was installing Slackware onto a laptop system I acquired and decided to try BtrFS as an experiment.

I setup my GPT partition table as such:

/dev/sda1 - ext2 - 10MB - /boot
/dev/sda2 - EF02 - 35KB - gpt-bios
/dev/sda3 - swap - 8GB - swap
/dev/sda4 - btrfs - 66GB - /

Everything installed fine and was going along until I chrooted into Slackware and attempted to configure grub2 to boot the system. When I ran grub-mkconfig is spat out this error:

Code:
grub-probe: [error] Could not find /dev. Is /dev mounted?
I even tried using chroot to download grub-2.02~beta2 and use the SlackBuild from source to rebuild the package. It too failed.

After trying to even manually mount /dev, which only seemed to keep remounting itself again and again, I gave up and decided to go back to my normal usage of JFS.

Has anyone else had this same error when trying to use BtrFS on GPT?

This never happened when I used MBR actually.
 
Old 11-25-2014, 06:46 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
Maybe you just forgot to bind mount /dev before chroot? I'd do this:
Code:
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
Else the directories /dev, /proc and /sys will be empty after chroot.
 
Old 11-25-2014, 07:39 PM   #3
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
No I did those including devpts and tmpfs on /dev/shm to make sure I mounted all the virtual file systems. It still wouldn't allow detection of /dev regardless of what I did.

I even tried booting through the DVD as a recovery method and it failed too.
 
Old 11-25-2014, 07:57 PM   #4
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
Isn't chrooting right after a install as simple as:

# chroot /mnt

?
 
Old 11-26-2014, 01:10 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,056

Rep: Reputation: Disabled
Quote:
Originally Posted by moisespedro View Post
Isn't chrooting right after a install as simple as:

# chroot /mnt

?
Please re-read my previous post, and even better; check yourself. Just type:
Code:
chroot /mnt
then check the content of /dev: it is exactly what's provided by installation of the package devs, as if /etc/rc.d/rc.udev hadn't be started.

But if you type instead
Code:
mount --bind /dev /mnt/dev
chroot /mnt
you'll see that the content of /dev is now what you get after /etc/rc.d/rc.udev has been started.

Last edited by Didier Spaier; 11-26-2014 at 01:13 AM.
 
Old 11-26-2014, 09:21 AM   #6
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Technically it's

chroot /mnt /bin/sh

But regardless all virtual filesystems were mounted

mount -v --bind /dev /mnt/dev
mount -vt devpts devpts /mnt/dev/pts -o gid=5,mode=620
mount -vt proc proc /mnt/proc
mount -vt sysfs sysfs /mnt/sys
mount -vt tmpfs tmpfs /mnt/dev/shm

Btw, if you use Didier's eudev that last line changes to

mount -vt tmpfs tmpfs /mnt/run

because /dev/shm becomes a symlink to /run/shm

Anyways, after retrying, it still fails to mount properly, so I went back to JFS and have no plans to retry this. On MBR partitioning it works, but on GPT, no. I'm not going to waste more time on this, especially with BtrFS. At least JFS works.
 
Old 12-05-2014, 08:35 PM   #7
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 210

Rep: Reputation: 76
I could get btrfs going OK with kernel 3.18.0-rc7 whatever grub was in git. Before that, the last time I checked on btrfs on / with GRUB was kernel 3.12 or 3.13. Basically, whatever kernel line I had the grub config program output to /boot/grub/grub.cfg, that command line was copied and modified to include "root=/dev/sda6 rootfstype=btrfs". It was a matter of copying the menu entry to boot an already-existing XFS / partition and changing the root= and rootfstype= lines as well as the description and ID of the menu entry itself. Because the /boot partition here is JFS, I did not have grub load a btrfs module.

Anyway, I know you've moved on, just letting you know that it may be at least marginally possible next time under certain circumstances. Sadly, there aren't enough quiet spare drives here to test booting btrfs in RAID-0/1/5 configurations. Sorry I'm not so good with GRUB, starting by booting XFS / from a blank menu until I could figure out how to update the menu and therefore add a btrfs partition...
 
  


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
Installing a system with btrfs, managing root snapshots LightSeeker Linux - Newbie 0 10-28-2013 11:44 PM
LXer: Btrfs Still Working To Address Corruption Issue LXer Syndicated Linux News 0 01-23-2013 03:00 PM
btrfs and lilo wont install on the root partition charlie_lab Slackware - Installation 9 09-08-2011 02:17 AM
How to enable btrfs + lzo comp. on root (and other) partitions during Ubuntu 11.04 iam_techno Linux - Software 0 05-01-2011 02:35 AM
Slack current with btrfs root (seperate /boot) has mkinitrd issue rexregis Slackware 7 03-12-2011 08:21 AM

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

All times are GMT -5. The time now is 07:44 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