* [gentoo-user] Hubris? @ 2015-07-28 11:34 Peter Humphrey 2015-07-28 11:39 ` Peter Humphrey 2015-07-28 13:22 ` [gentoo-user] Hubris? Stroller 0 siblings, 2 replies; 22+ messages in thread From: Peter Humphrey @ 2015-07-28 11:34 UTC (permalink / raw To: gentoo-user Hello list, Hardly had I said that MBR had caused me no problems in years, guess what? It did. I tried to mount /boot (ext2) to install a new kernel but it couldn't be mounted - wrong fs type or some such. When I got it mounted as ext4 it looked fine. Fsck had found nothing wrong either, but fdisk showed the wrong partition as Active. /boot is on /dev/md1 which is RAID-1 built on /dev/sd[ab]1, so sda1 should have been marked Active (it was when I set it up), but the spare, empty sda2 was instead. On booting a rescue system and correcting the Active flag with fdisk, all the files in it disappeared. So I put them back in and booted the main system. Same all over again. In the end I just zapped /, /var, /usr/portage etc, restored from an older backup, synced and emerged -e world. Then restoring the files in /boot resulted in a stable system. Looks like time I investigated GPT or BTRFS. But I don't want to go from GRUB legacy to GRUB-2. Is that possible? -- Rgds Peter ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 11:34 [gentoo-user] Hubris? Peter Humphrey @ 2015-07-28 11:39 ` Peter Humphrey 2015-07-28 12:16 ` Neil Bothwick 2015-07-28 13:22 ` [gentoo-user] Hubris? Stroller 1 sibling, 1 reply; 22+ messages in thread From: Peter Humphrey @ 2015-07-28 11:39 UTC (permalink / raw To: gentoo-user On Tuesday 28 July 2015 12:34:15 I wrote: > Looks like time I investigated GPT or BTRFS. But I don't want to go from > GRUB legacy to GRUB-2. Is that possible? In particular, is there a suitable installation medium that can create BTRFS before installing into it? -- Rgds Peter ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 11:39 ` Peter Humphrey @ 2015-07-28 12:16 ` Neil Bothwick 2015-07-28 12:31 ` Rich Freeman 0 siblings, 1 reply; 22+ messages in thread From: Neil Bothwick @ 2015-07-28 12:16 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 379 bytes --] On Tue, 28 Jul 2015 12:39:47 +0100, Peter Humphrey wrote: > In particular, is there a suitable installation medium that can create > BTRFS before installing into it? System Rescue Cd, I've just installed a new laptop with it, using btrfs for everything but /boot. -- Neil Bothwick First Law of Laboratory Work: Hot glass looks exactly the same as cold glass. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 12:16 ` Neil Bothwick @ 2015-07-28 12:31 ` Rich Freeman 2015-07-28 14:40 ` Peter Humphrey 0 siblings, 1 reply; 22+ messages in thread From: Rich Freeman @ 2015-07-28 12:31 UTC (permalink / raw To: gentoo-user On Tue, Jul 28, 2015 at 8:16 AM, Neil Bothwick <neil@digimed.co.uk> wrote: > On Tue, 28 Jul 2015 12:39:47 +0100, Peter Humphrey wrote: > >> In particular, is there a suitable installation medium that can create >> BTRFS before installing into it? > > System Rescue Cd, I've just installed a new laptop with it, using btrfs > for everything but /boot. > Agree - I use that as my, well, rescue image in part because it ships recent kernels and has btrfs support. Just be sure to use the most recent version, and boot with the alternate kernel (which is currently 3.18-based). With btrfs you'll want a recent kernel - I am currently tracking 3.18 which is the most recent longterm, and will probably jump to the next longterm when it matures. Just avoid parity raid (raid5/6) for now - that is very immature and there are constant reports of problems (it really was only supported at all in the last few months). Also, if you want to migrate an existing ext3/4 partition check the lists as there have been a bunch of threads about conversion issues recently - that should be a non-issue if you're just formatting a new partition. Grub2 can also read your kernel/initramfs from btrfs, so I'd recommend it even though you're trying to avoid it. Otherwise you're probably going to need a separate ext4 boot partition (I don't think legacy grub can read btrfs). I just make install my kernels and use grub2-mkconfig - it is nice having a list of older kernels auto-updated. Or you can hand-roll the config like you do in grub - it isn't any harder than it used to be but there just aren't as many docs on how to do it. -- Rich ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 12:31 ` Rich Freeman @ 2015-07-28 14:40 ` Peter Humphrey 2015-07-28 16:26 ` Rich Freeman 0 siblings, 1 reply; 22+ messages in thread From: Peter Humphrey @ 2015-07-28 14:40 UTC (permalink / raw To: gentoo-user On Tuesday 28 July 2015 08:31:58 Rich Freeman wrote: > On Tue, Jul 28, 2015 at 8:16 AM, Neil Bothwick <neil@digimed.co.uk> wrote: > > On Tue, 28 Jul 2015 12:39:47 +0100, Peter Humphrey wrote: > >> In particular, is there a suitable installation medium that can create > >> BTRFS before installing into it? > > > > System Rescue Cd So I see now I try it. I only asked because I didn't see it mentioned on their website. > > I've just installed a new laptop with it, using btrfs > > for everything but /boot. I know you use grub-2, which can boot that setup, but I suppose I'd need an init thingy if I stick to grub legacy. > Agree - I use that as my, well, rescue image in part because it ships > recent kernels and has btrfs support. Just be sure to use the most > recent version, and boot with the alternate kernel (which is currently > 3.18-based). With btrfs you'll want a recent kernel - I am currently > tracking 3.18 which is the most recent longterm, and will probably > jump to the next longterm when it matures. > > Just avoid parity raid (raid5/6) for now Yes, I was just going to use RAID-1. > Grub2 can also read your kernel/initramfs from btrfs, so I'd recommend > it even though you're trying to avoid it. Otherwise you're probably > going to need a separate ext4 boot partition (I don't think legacy > grub can read btrfs). I just make install my kernels and use > grub2-mkconfig - it is nice having a list of older kernels > auto-updated. Or you can hand-roll the config like you do in grub - > it isn't any harder than it used to be but there just aren't as many > docs on how to do it. My main reason for preferring grub legacy is illustrated by my present grub.conf: title=Gentoo Linux 4.0.5 kernel /boot/kernel-x86_64-4.0.5-gentoo root=/dev/md5 net.ifnames=0 irqpoll title=Gentoo Linux 4.0.5, no X kernel /boot/kernel-x86_64-4.0.5-gentoo root=/dev/md5 softlevel=nox net.ifnames=0 irqpoll title=Gentoo Linux 4.0.5, no network kernel /boot/kernel-x86_64-4.0.5-gentoo root=/dev/md5 softlevel=nonet net.ifnames=0 irqpoll title=Gentoo Linux 3.18.16 kernel /boot/kernel-x86_64-3.18.16-gentoo root=/dev/md5 net.ifnames=0 irqpoll title=Gentoo Linux 3.18.16, no X kernel /boot/kernel-x86_64-3.18.16-gentoo root=/dev/md5 softlevel=nox net.ifnames=0 irqpoll title=Gentoo Linux 3.18.16, no network kernel /boot/kernel-x86_64-3.18.16-gentoo root=/dev/md5 softlevel=nonet net.ifnames=0 irqpoll title=Rescue System 3.18.12 kernel /boot/kernel-x86_64-3.18.12-gentoo-rescue root=/dev/sda8 net.ifnames=0 irqpoll title=Rescue System 4.0.5 kernel /boot/kernel-x86_64-4.0.5-gentoo-rescue root=/dev/sda8 net.ifnames=0 irqpoll I know it's supposed to be possible to set up something like that in grub-2, but last time I tried it I got into a mess and gave up. As you say, guidance is hard to find. -- Rgds Peter ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 14:40 ` Peter Humphrey @ 2015-07-28 16:26 ` Rich Freeman 2015-07-28 17:02 ` Neil Bothwick 2015-07-28 19:29 ` Bruce Schultz 0 siblings, 2 replies; 22+ messages in thread From: Rich Freeman @ 2015-07-28 16:26 UTC (permalink / raw To: gentoo-user On Tue, Jul 28, 2015 at 10:40 AM, Peter Humphrey <peter@prh.myzen.co.uk> wrote: > On Tuesday 28 July 2015 08:31:58 Rich Freeman wrote: >> On Tue, Jul 28, 2015 at 8:16 AM, Neil Bothwick <neil@digimed.co.uk> wrote: > >> > I've just installed a new laptop with it, using btrfs >> > for everything but /boot. > > I know you use grub-2, which can boot that setup, but I suppose I'd need an > init thingy if I stick to grub legacy. You may not need an initramfs to run root on btrfs as long as btrfs is compiled into your kernel (I haven't looked into it closely though). You WOULD need a boot partition on ext4 to store your kernel on, since grub legacy can't read a kernel/initramfs off of btrfs. All grub does is read your kernel and initramfs and run the kernel. The kernel actually does all the drive mounting/etc. So, as long as grub can read your kernel (and initramfs if you're using one) then you're fine, since the kernel can do just about anything. And this is one of the whole points of projects like linuxbios/coreboot/etc. Traditionally PC bootloaders have been pretty limited in capabilities, so by using a linux kernel as your bootloader you can potentially boot anything linux+userspace can read (such as retrieving a kernel image and root squashfs from an FTP site and booting it, or running an SMTP server and booting whatever kernel somebody emails as an attachment - ok, I'm going a bit crazy with that one). > > My main reason for preferring grub legacy is illustrated by my present > grub.conf: > > title=Gentoo Linux 4.0.5 > kernel /boot/kernel-x86_64-4.0.5-gentoo root=/dev/md5 net.ifnames=0 irqpoll > > title=Gentoo Linux 4.0.5, no X > kernel /boot/kernel-x86_64-4.0.5-gentoo root=/dev/md5 softlevel=nox net.ifnames=0 irqpoll > > title=Gentoo Linux 4.0.5, no network > kernel /boot/kernel-x86_64-4.0.5-gentoo root=/dev/md5 softlevel=nonet net.ifnames=0 irqpoll > > title=Gentoo Linux 3.18.16 > kernel /boot/kernel-x86_64-3.18.16-gentoo root=/dev/md5 net.ifnames=0 irqpoll > > title=Gentoo Linux 3.18.16, no X > kernel /boot/kernel-x86_64-3.18.16-gentoo root=/dev/md5 softlevel=nox net.ifnames=0 irqpoll > > title=Gentoo Linux 3.18.16, no network > kernel /boot/kernel-x86_64-3.18.16-gentoo root=/dev/md5 softlevel=nonet net.ifnames=0 irqpoll > > title=Rescue System 3.18.12 > kernel /boot/kernel-x86_64-3.18.12-gentoo-rescue root=/dev/sda8 net.ifnames=0 irqpoll > > title=Rescue System 4.0.5 > kernel /boot/kernel-x86_64-4.0.5-gentoo-rescue root=/dev/sda8 net.ifnames=0 irqpoll > > I know it's supposed to be possible to set up something like that in grub-2, > but last time I tried it I got into a mess and gave up. > > As you say, guidance is hard to find. Yeah, that one probably would need some hand-rolling unless you basically wanted to write your own mkconfig plugins or your own mkconfig. But, it is certainly possible to hand-roll that. Something like: menuentry 'Gentoo Linux 4.0.5' { linux /boot/kernel-x86_64-4.0.5-gentoo root=/dev/md5 net.ifnames=0 irqpoll } ... You need all the header stuff like setting your root and such. The syntax changed a little from legacy grub, but it is all the same thing. If you look at the mkconfig-generated files you'll see a ton of wrapper scripting/etc that is completely unnecessary if you're hand-rolling it. There is actually very little you need to make it work. Just set root= whatever, maybe set a default=0 or whatever, and then have your menuentry lines. -- Rich ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 16:26 ` Rich Freeman @ 2015-07-28 17:02 ` Neil Bothwick 2015-07-28 19:29 ` Bruce Schultz 1 sibling, 0 replies; 22+ messages in thread From: Neil Bothwick @ 2015-07-28 17:02 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 739 bytes --] On Tue, 28 Jul 2015 12:26:14 -0400, Rich Freeman wrote: > Yeah, that one probably would need some hand-rolling unless you > basically wanted to write your own mkconfig plugins or your own > mkconfig. Writing your own mkconfig plugin is pretty simple, it's just a shell script that spits out the relevant lines for each kernel it finds. for KERNEL in /boot/vmlinuz-*; do echo "menuentry \"$KERNEL\" {" echo "linux $KERNEL $STD_OPTS" echo "}" done You can tidy that up a bit and add extra lines to output No X or rescue alternatives, and you can grab the correct syntax from the mkconfig generated file in the first place. -- Neil Bothwick You are a completely unique individual, just like everybody else. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 16:26 ` Rich Freeman 2015-07-28 17:02 ` Neil Bothwick @ 2015-07-28 19:29 ` Bruce Schultz 2015-07-28 20:18 ` Neil Bothwick 1 sibling, 1 reply; 22+ messages in thread From: Bruce Schultz @ 2015-07-28 19:29 UTC (permalink / raw To: gentoo-user On 29 July 2015 2:26:14 AM AEST, Rich Freeman <rich0@gentoo.org> wrote: >On Tue, Jul 28, 2015 at 10:40 AM, Peter Humphrey ><peter@prh.myzen.co.uk> wrote: >> On Tuesday 28 July 2015 08:31:58 Rich Freeman wrote: >>> On Tue, Jul 28, 2015 at 8:16 AM, Neil Bothwick <neil@digimed.co.uk> >wrote: >> >>> > I've just installed a new laptop with it, using btrfs >>> > for everything but /boot. >> >> I know you use grub-2, which can boot that setup, but I suppose I'd >need an >> init thingy if I stick to grub legacy. > >You may not need an initramfs to run root on btrfs as long as btrfs is >compiled into your kernel (I haven't looked into it closely though). But I think you do if your btrfs is raid 1. The kernel can't mount multidisk btrfs until it done a btrfs device scan in userspace, run from initramfs. -- :b ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 19:29 ` Bruce Schultz @ 2015-07-28 20:18 ` Neil Bothwick 2015-07-28 21:59 ` Mick ` (2 more replies) 0 siblings, 3 replies; 22+ messages in thread From: Neil Bothwick @ 2015-07-28 20:18 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 543 bytes --] On Wed, 29 Jul 2015 05:29:18 +1000, Bruce Schultz wrote: > >You may not need an initramfs to run root on btrfs as long as btrfs is > >compiled into your kernel (I haven't looked into it closely though). > > But I think you do if your btrfs is raid 1. The kernel can't mount > multidisk btrfs until it done a btrfs device scan in userspace, run > from initramfs. According to the btrfs wiki you can pass device=/dev/sda1,device=/dev/sdb1 on the kernel boot line. -- Neil Bothwick Indecision is the key to flexibility. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 20:18 ` Neil Bothwick @ 2015-07-28 21:59 ` Mick 2015-07-28 23:40 ` Neil Bothwick 2015-07-29 8:13 ` Peter Humphrey 2015-07-29 10:53 ` Bruce Schultz 2 siblings, 1 reply; 22+ messages in thread From: Mick @ 2015-07-28 21:59 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: Text/Plain, Size: 716 bytes --] On Tuesday 28 Jul 2015 21:18:43 Neil Bothwick wrote: > On Wed, 29 Jul 2015 05:29:18 +1000, Bruce Schultz wrote: > > >You may not need an initramfs to run root on btrfs as long as btrfs is > > >compiled into your kernel (I haven't looked into it closely though). > > > > But I think you do if your btrfs is raid 1. The kernel can't mount > > multidisk btrfs until it done a btrfs device scan in userspace, run > > from initramfs. > > According to the btrfs wiki you can pass > device=/dev/sda1,device=/dev/sdb1 on the kernel boot line. Apologies if I have missed it, but what is wrong with using vanilla ext2 for /boot? Install it on /dev/sda and then dd it onto /dev/sdb. -- Regards, Mick [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 21:59 ` Mick @ 2015-07-28 23:40 ` Neil Bothwick 2015-07-29 8:22 ` Peter Humphrey 0 siblings, 1 reply; 22+ messages in thread From: Neil Bothwick @ 2015-07-28 23:40 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 645 bytes --] On Tue, 28 Jul 2015 22:59:40 +0100, Mick wrote: > > > But I think you do if your btrfs is raid 1. The kernel can't mount > > > multidisk btrfs until it done a btrfs device scan in userspace, run > > > from initramfs. > > > > According to the btrfs wiki you can pass > > device=/dev/sda1,device=/dev/sdb1 on the kernel boot line. > > Apologies if I have missed it, but what is wrong with using vanilla > ext2 for /boot? The question is about the kernel mounting / from a multi-device btrfs, without an initramfs - nothing to do with /boot. -- Neil Bothwick SITCOM: Single Income, Two Children, Oppressive Mortgage [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 23:40 ` Neil Bothwick @ 2015-07-29 8:22 ` Peter Humphrey 2015-07-29 9:03 ` Neil Bothwick 0 siblings, 1 reply; 22+ messages in thread From: Peter Humphrey @ 2015-07-29 8:22 UTC (permalink / raw To: gentoo-user On Wednesday 29 July 2015 00:40:41 Neil Bothwick wrote: > On Tue, 28 Jul 2015 22:59:40 +0100, Mick wrote: > > > > But I think you do if your btrfs is raid 1. The kernel can't mount > > > > multidisk btrfs until it done a btrfs device scan in userspace, run > > > > from initramfs. > > > > > > According to the btrfs wiki you can pass > > > device=/dev/sda1,device=/dev/sdb1 on the kernel boot line. > > > > Apologies if I have missed it, but what is wrong with using vanilla > > ext2 for /boot? > > The question is about the kernel mounting / from a multi-device btrfs, > without an initramfs - nothing to do with /boot. It's a good question all the same, tangential or not. -- Rgds Peter ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-29 8:22 ` Peter Humphrey @ 2015-07-29 9:03 ` Neil Bothwick 0 siblings, 0 replies; 22+ messages in thread From: Neil Bothwick @ 2015-07-29 9:03 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 619 bytes --] On Wed, 29 Jul 2015 09:22:47 +0100, Peter Humphrey wrote: >> > Apologies if I have missed it, but what is wrong with using vanilla > > > ext2 for /boot? > > > > The question is about the kernel mounting / from a multi-device btrfs, > > without an initramfs - nothing to do with /boot. > > It's a good question all the same, tangential or not. Yes, and it's what I do on my desktop, which doesn't use UEFI. As we migrate to UEFI hardware the question becomes moot as we use FAT for /boot, and no longer have to deal with GRUB. -- Neil Bothwick Very funny Scotty.. now beam down my pants! [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 20:18 ` Neil Bothwick 2015-07-28 21:59 ` Mick @ 2015-07-29 8:13 ` Peter Humphrey 2015-07-29 8:21 ` Neil Bothwick 2015-07-29 10:53 ` Bruce Schultz 2 siblings, 1 reply; 22+ messages in thread From: Peter Humphrey @ 2015-07-29 8:13 UTC (permalink / raw To: gentoo-user On Tuesday 28 July 2015 21:18:43 Neil Bothwick wrote: > On Wed, 29 Jul 2015 05:29:18 +1000, Bruce Schultz wrote: > > >You may not need an initramfs to run root on btrfs as long as btrfs is > > >compiled into your kernel (I haven't looked into it closely though). > > > > But I think you do if your btrfs is raid 1. The kernel can't mount > > multidisk btrfs until it done a btrfs device scan in userspace, run > > from initramfs. > > According to the btrfs wiki you can pass > device=/dev/sda1,device=/dev/sdb1 on the kernel boot line. Thanks all. I think I'm going to dive straight in and build a new system. First I'll have another go at grub-2, then when that's working I'll start a new build. As far as I can see, /boot can just be on the single sda1, with a duplicate on sdb1 in reserve. -- Rgds Peter ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-29 8:13 ` Peter Humphrey @ 2015-07-29 8:21 ` Neil Bothwick 0 siblings, 0 replies; 22+ messages in thread From: Neil Bothwick @ 2015-07-29 8:21 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 563 bytes --] On Wed, 29 Jul 2015 09:13:50 +0100, Peter Humphrey wrote: > I think I'm going to dive straight in and build a new system. First > I'll have another go at grub-2, then when that's working I'll start a > new build. > > As far as I can see, /boot can just be on the single sda1, with a > duplicate on sdb1 in reserve. Yes, I set the boot partitions up as a RAID1 (MD RAID, not btrfs RAID). Then GRUB can read any one of them but they are all kept in sync. -- Neil Bothwick C:\DOS\SYSTEM\BATCH\UTILS\API\DOCS\READ\STORED\WHERE\THE\HELL\AM\I\? [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 20:18 ` Neil Bothwick 2015-07-28 21:59 ` Mick 2015-07-29 8:13 ` Peter Humphrey @ 2015-07-29 10:53 ` Bruce Schultz 2015-08-09 16:13 ` Jeremi Piotrowski 2 siblings, 1 reply; 22+ messages in thread From: Bruce Schultz @ 2015-07-29 10:53 UTC (permalink / raw To: gentoo-user On 29 July 2015 6:18:43 AM AEST, Neil Bothwick <neil@digimed.co.uk> wrote: >On Wed, 29 Jul 2015 05:29:18 +1000, Bruce Schultz wrote: > >> >You may not need an initramfs to run root on btrfs as long as btrfs >is >> >compiled into your kernel (I haven't looked into it closely though). > >> >> But I think you do if your btrfs is raid 1. The kernel can't mount >> multidisk btrfs until it done a btrfs device scan in userspace, run >> from initramfs. > >According to the btrfs wiki you can pass >device=/dev/sda1,device=/dev/sdb1 on the kernel boot line. I'd forgotten that option. Btrfs wiki also says this though: "Using device is not recommended, as it is sensitive to device names changing. You should really be using a initramfs. Most modern distributions will do this for you automatically if you install their own btrfs-progs package." https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices#Registration_in_.2Fetc.2Ffstab -- :b ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-29 10:53 ` Bruce Schultz @ 2015-08-09 16:13 ` Jeremi Piotrowski 2015-08-09 23:14 ` Paul Tobias 0 siblings, 1 reply; 22+ messages in thread From: Jeremi Piotrowski @ 2015-08-09 16:13 UTC (permalink / raw To: gentoo-user On Wed, Jul 29, 2015 at 12:53 PM, Bruce Schultz <brulzki@gmail.com> wrote: > On 29 July 2015 6:18:43 AM AEST, Neil Bothwick <neil@digimed.co.uk> wrote: >> On Wed, 29 Jul 2015 05:29:18 +1000, Bruce Schultz wrote: >>> But I think you do if your btrfs is raid 1. The kernel can't mount >>> multidisk btrfs until it done a btrfs device scan in userspace, run >>> from initramfs. >> >> According to the btrfs wiki you can pass >> device=/dev/sda1,device=/dev/sdb1 on the kernel boot line. > > I'd forgotten that option. Btrfs wiki also says this though: > > "Using device is not recommended, as it is sensitive to device names > changing. You should really be using a initramfs. Most modern distributions > will do this for you automatically if you install their own btrfs-progs > package." I was wondering if *anyone* has actually seen this work. I'm referring to booting a raid1 btrfs volume without performing a user-space device scan, using only the kernel `rootflags=device` setting. I have been struggling with this in various settings and am slowly starting to believe that this scenario is simply broken. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-08-09 16:13 ` Jeremi Piotrowski @ 2015-08-09 23:14 ` Paul Tobias 2015-08-10 0:06 ` [gentoo-user] Hubris? James 0 siblings, 1 reply; 22+ messages in thread From: Paul Tobias @ 2015-08-09 23:14 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1487 bytes --] On 9 Aug 2015 17:15, "Jeremi Piotrowski" <jeremi.piotrowski@gmail.com> wrote: > > On Wed, Jul 29, 2015 at 12:53 PM, Bruce Schultz <brulzki@gmail.com> wrote: > > On 29 July 2015 6:18:43 AM AEST, Neil Bothwick <neil@digimed.co.uk> wrote: > >> On Wed, 29 Jul 2015 05:29:18 +1000, Bruce Schultz wrote: > >>> But I think you do if your btrfs is raid 1. The kernel can't mount > >>> multidisk btrfs until it done a btrfs device scan in userspace, run > >>> from initramfs. > >> > >> According to the btrfs wiki you can pass > >> device=/dev/sda1,device=/dev/sdb1 on the kernel boot line. > > > > I'd forgotten that option. Btrfs wiki also says this though: > > > > "Using device is not recommended, as it is sensitive to device names > > changing. You should really be using a initramfs. Most modern distributions > > will do this for you automatically if you install their own btrfs-progs > > package." > > I was wondering if *anyone* has actually seen this work. I'm referring to > booting a raid1 btrfs volume without performing a user-space device scan, > using only the kernel `rootflags=device` setting. I have been struggling with > this in various settings and am slowly starting to believe that this scenario > is simply broken. It works, but a patched kernel is needed. Take a look at https://forums.gentoo.org/viewtopic-p-7275724.html The patch there was still working on the latest kernel a while ago. I used it on 2 of my systems, but I moved on and now using dracut everywhere. [-- Attachment #2: Type: text/html, Size: 2030 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-user] Re: Hubris? 2015-08-09 23:14 ` Paul Tobias @ 2015-08-10 0:06 ` James 2015-08-11 0:44 ` Jeremi Piotrowski 0 siblings, 1 reply; 22+ messages in thread From: James @ 2015-08-10 0:06 UTC (permalink / raw To: gentoo-user Paul Tobias <tobias.pal <at> gmail.com> writes: > > > I was wondering if *anyone* has actually seen this work. I'm referring to > > booting a raid1 btrfs volume without performing a user-space device scan, > > using only the kernel `rootflags=device` setting. I have been struggling > > with this in various settings and am slowly starting to believe that > > this scenario is simply broken. > It works, but a patched kernel is needed. Take a look at https://forums.gentoo.org/viewtopic-p-7275724.html The patch there was still working on the latest kernel a while ago. I used it on 2 of my systems, but I moved on and now using dracut everywhere. > I not sure but the OpenSuse btrfs (non-raid1) standard install uses only btrfs partition types, including /boot and all other partitions. I do not think it uses dracut or others, but I'm not that use to opensuse to make that call. I've installed other linux distros on top of now so I no longer have thank opensuse-13.2. install to look at that install. I do know know what if any kernel patches were used either. Other linux installs such as the gentoo-derivative (calculate) linux might be worth experimentation to see if they work as you expect. Also, did you look at Rich's notes: https://docs.google.com/document/ d/1VJlJyYLTZScta9a81xgKOIBjYsG3_VfxxmUSxG23Uxg/edit?pli=1 hth, James ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Re: Hubris? 2015-08-10 0:06 ` [gentoo-user] Hubris? James @ 2015-08-11 0:44 ` Jeremi Piotrowski 2015-08-11 2:44 ` James 0 siblings, 1 reply; 22+ messages in thread From: Jeremi Piotrowski @ 2015-08-11 0:44 UTC (permalink / raw To: gentoo-user > Paul Tobias <tobias.pal <at> gmail.com> writes: > > It works, but a patched kernel is needed. Take a look at > > https://forums.gentoo.org/viewtopic-p-7275724.html The patch there was > > still working on the latest kernel a while ago. The patch from the forum thread does indeed work, and just reading it makes it clear *why* it doesn't work in linus' kernel. Thanks! > > I used it on 2 of my systems, but I moved on and now using dracut > > everywhere. While I agree that dracut (/genkernel) is painless, not hard to setup and *should* be the preferred way to boot nowadays, I felt that its a matter of principle that this should work without one. I mean, they even mention in the btrfs wiki that this works (supposedly). In any case I feel like this is a bug in the kernel. Once I work up the courage I'll contact the btrfs(/kernel) mailing list and see what they have to say about this. On Mon, 10 Aug 2015, James wrote: > I not sure but the OpenSuse btrfs (non-raid1) standard install uses only > btrfs partition types, including /boot and all other partitions. I do not > think it uses dracut or others, but I'm not that use to opensuse to make > install. I happen to have a fairly recent OpenSuse vm lying around, featuring a pure btrfs set-up - boot in a subvolume etc. It's non-raid1 but OpenSuse uses dracut so they do not have the problem that I brought up anyway. In general I have not had any problems setting up similar gentoo systems running pure btrfs in raid1/single mode. Those systems, however, all have initramfs' - not that that's a bad thing but see above. Btw. testing the mentioned patch turned out to be a 5 minute thing. qemu-img create to make 2 disk images, qemu boot sysresuecd, create 2 device btrfs volume, mount, unpack stage3 and shutdown. Patch spare kernel in host, compile and boot passing the kernel and cmdline from outside the guest. Works nicely for quick testing (forgot to set root passwd? who cares, it boots!). ^ permalink raw reply [flat|nested] 22+ messages in thread
* [gentoo-user] Re: Hubris? 2015-08-11 0:44 ` Jeremi Piotrowski @ 2015-08-11 2:44 ` James 0 siblings, 0 replies; 22+ messages in thread From: James @ 2015-08-11 2:44 UTC (permalink / raw To: gentoo-user Jeremi Piotrowski <jeremi.piotrowski <at> gmail.com> writes: > In general I have not had any problems setting up similar gentoo systems > running pure btrfs in raid1/single mode. Those systems, however, all have > initramfs' - not that that's a bad thing but see above. I too am also interested in booting a btrfs-raid1 all btrfs file system based gentoo, without an interramfs. Some discussions I've read seem to indicate this has occurred already; so maybe it's just a situation where the knowledge and tricks just need to be disseminated more clearly. > Btw. testing the mentioned patch turned out to be a 5 minute thing. > qemu-img create to make 2 disk images, qemu boot sysresuecd, create 2 > device btrfs volume, mount, unpack stage3 and shutdown. Patch spare kernel > in host, compile and boot passing the kernel and cmdline from outside the > guest. Works nicely for quick testing (forgot to set root passwd? who > cares, it boots!). Here [1] on the Btrfs 'gotchas' page are some interesting and related problems described in some detail. Also in the kernel pages [2] hint at issues with file systems that may be related; but more digging will is needed. I hope a documented solution is verified and integrated into Rich's btrfs, raid-1 install notes: [3] . The 'printk' comments are very similar to how and why 'netconsole' was used to diagnose booting issues with the kernel, hardware, fs etc etc [4]. This use of netconsole to perform a 'fine grained debug' of the kernel boot processes is something I hope to figure out and put into an automated gentoo installer as a integral part of the installation semantics, for gentoo. All you need is the system's ethernet port up and a second system to receive the (printk) data stream. hth, James [1] https://btrfs.wiki.kernel.org/index.php/Gotchas [2] http://kernelnewbies.org/Linux_4.0#head-6e2ee9e5b7cfdb480861fda324a804734dc14f89 [3] https://docs.google.com/document/ d/1VJlJyYLTZScta9a81xgKOIBjYsG3_VfxxmUSxG23Uxg/edit?pli=1 [4] https://www.kernel.org/doc/Documentation/networking/netconsole.txt ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [gentoo-user] Hubris? 2015-07-28 11:34 [gentoo-user] Hubris? Peter Humphrey 2015-07-28 11:39 ` Peter Humphrey @ 2015-07-28 13:22 ` Stroller 1 sibling, 0 replies; 22+ messages in thread From: Stroller @ 2015-07-28 13:22 UTC (permalink / raw To: gentoo-user On Tue, 28 July 2015, at 12:34 pm, Peter Humphrey <peter@prh.myzen.co.uk> wrote: > > But I don't want to go from GRUB legacy to GRUB-2. Is that possible? I didn't want to go to GRUB-2 either but, in fact, doing so was far easier than I expected. Stroller. ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2015-08-11 2:44 UTC | newest] Thread overview: 22+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-07-28 11:34 [gentoo-user] Hubris? Peter Humphrey 2015-07-28 11:39 ` Peter Humphrey 2015-07-28 12:16 ` Neil Bothwick 2015-07-28 12:31 ` Rich Freeman 2015-07-28 14:40 ` Peter Humphrey 2015-07-28 16:26 ` Rich Freeman 2015-07-28 17:02 ` Neil Bothwick 2015-07-28 19:29 ` Bruce Schultz 2015-07-28 20:18 ` Neil Bothwick 2015-07-28 21:59 ` Mick 2015-07-28 23:40 ` Neil Bothwick 2015-07-29 8:22 ` Peter Humphrey 2015-07-29 9:03 ` Neil Bothwick 2015-07-29 8:13 ` Peter Humphrey 2015-07-29 8:21 ` Neil Bothwick 2015-07-29 10:53 ` Bruce Schultz 2015-08-09 16:13 ` Jeremi Piotrowski 2015-08-09 23:14 ` Paul Tobias 2015-08-10 0:06 ` [gentoo-user] Hubris? James 2015-08-11 0:44 ` Jeremi Piotrowski 2015-08-11 2:44 ` James 2015-07-28 13:22 ` [gentoo-user] Hubris? Stroller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox