You are not logged in.

#1 2012-10-08 22:16:19

kodiak
Member
Registered: 2012-04-26
Posts: 64

[solved] Can not see rollback feature on boot with btrfs and grub2

Hi there,
I followed the instructions on https://wiki.archlinux.org/index.php/In … root_drive. This is my handy work:

$ sudo btrfs subvolume list /
ID 261 top level 5 path __active
ID 262 top level 5 path __active/home
ID 263 top level 5 path __active/var
ID 265 top level 5 path __active/usr
ID 361 top level 5 path __snapshot/my_savepoint-2012-10-07-1349616396
ID 362 top level 5 path __snapshot/my_savepoint-2012-10-07-1349616504

And the hooks part:

$ cat /etc/mkinitcpio.conf 
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options
# like so:
#    FILES="/etc/modprobe.d/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS="base udev autodetect pata scsi sata filesystems"
#
##   This is identical to the above, except the old ide subsystem is
##   used for IDE devices instead of the new pata subsystem.
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS="base udev pata scsi sata usb filesystems"
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS="base udev pata mdadm encrypt filesystems"
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect pata scsi sata filesystems usbinput fsck btrfs_advanced"

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""

Additional:

$ cat /proc/cmdline 
BOOT_IMAGE=/__active/boot/vmlinuz-linux root=UUID=81410cb0-62ba-408b-a5b2-a8a6354fb090 ro rootflags=subvol=__active quiet

$ cat /etc/default/grub 
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter 
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" 
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper 
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

#GRUB_SAVEDEFAULT="true"

pacman -Ss btrfs-progs
core/btrfs-progs 0.19.20120904-7 [installed]
    btrfs filesystem utilities

What am I missing?

Last edited by kodiak (2013-12-01 19:28:07)

Offline

#2 2012-10-09 18:04:35

kodiak
Member
Registered: 2012-04-26
Posts: 64

Re: [solved] Can not see rollback feature on boot with btrfs and grub2

BUMP

How is the boot menu supposed to look like? What I assume is that  I will have two more options which will me allow to choose from my two backups on "__snapshot/". Am I right? Some comments would be nice :-)

Offline

#3 2012-10-10 06:43:36

kodiak
Member
Registered: 2012-04-26
Posts: 64

Re: [solved] Can not see rollback feature on boot with btrfs and grub2

Forgot to mention:

yaourt -Ss mkinitcpio-btrfs
aur/mkinitcpio-btrfs 0.3.2-0 [installed] (69)
    [initramfs] Rollback operations on BTRFS-based root devices

Offline

#4 2012-10-19 17:59:05

frumble
Member
From: Germany
Registered: 2012-05-20
Posts: 162
Website

Re: [solved] Can not see rollback feature on boot with btrfs and grub2

The same here. No more boot options or messages during boot. Correct hook and system in the btrfs partition under __active (two underlines, right?). Does no one have an idea?

Offline

#5 2012-10-20 22:18:30

cephi
Member
Registered: 2012-10-20
Posts: 1

Re: [solved] Can not see rollback feature on boot with btrfs and grub2

Same problem here. Are both of you using grub? I tried with syslinux and it worked but don't know how to get it running with grub.

Offline

#6 2012-10-21 00:56:51

frumble
Member
From: Germany
Registered: 2012-05-20
Posts: 162
Website

Re: [solved] Can not see rollback feature on boot with btrfs and grub2

Yes, I'm using Grub 2 on a separate /boot partition with ext4, but my / is btrfs.

Offline

#7 2012-10-23 02:26:17

xtfxme
Member
Registered: 2012-08-16
Posts: 2

Re: [solved] Can not see rollback feature on boot with btrfs and grub2

i take it no one got this working?

tbh, i had to move off of btrfs for unrelated reasons almost two years ago... so i've done next to nothing in terms of updates since then.

i never tried it with grub2, but i've been thinking about moving back to btrfs as of late anyway, so i'll try and put some time into this over the weekend.

i'm pretty inundated ATM with work-related things but that is declining rapidly... still, no promises :-/


what am i but an extension of you?

Offline

#8 2012-10-28 13:40:02

kodiak
Member
Registered: 2012-04-26
Posts: 64

Re: [solved] Can not see rollback feature on boot with btrfs and grub2

$ lsblk   
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0 93.2G  0 disk
├─sda1   8:1    0    1M  0 part
└─sda2   8:2    0 93.2G  0 part /

I am using grub2 as well. "/", "boot" and "everything else" reside in sda2. Glad to hear I am not alone smile

Last edited by kodiak (2012-10-28 13:41:38)

Offline

#9 2013-12-01 19:27:31

kodiak
Member
Registered: 2012-04-26
Posts: 64

Re: [solved] Can not see rollback feature on boot with btrfs and grub2

solved with newer version of mkinitcpio-btrfs

Offline

Board footer

Powered by FluxBB