Change default btrfs subvolume - GRUB problem

grub-mkconfig  creates a grub.cfg with this kernel command line:
linux /vmlinuz-linux root=UUID=88e4e9db-0d5d-4055-bb36-6c4bc3454cb3 rw rootflags=subvol=SB0 quiet video=hyperv_fb:1920x1080
my problem lies in rootflags=subvol=SB0 where is named a specific btrfs subvolume.
I would like no subvolume be specified in grub.cfg so that the default one will be mounted as root filesystem.
The reason is I have arch installed into btrfs subvols and I would like to choose which arch variant to boot simply changing default subvol.
(I've used the installation tips found at http://www.funtoo.org/BTRFS_Fun )
This is btrfs root :
~/bin > mount /dev/sda2 -o subvolid=0 /mnt
~/bin > btrfs filesys show /mnt
Label: none uuid: 88e4e9db-0d5d-4055-bb36-6c4bc3454cb3
Total devices 1 FS bytes used 3.47GiB
devid 1 size 126.81GiB used 6.04GiB path /dev/sda2
btrfs-progs v3.19.1
/etc/fstab :
~/bin > cat /etc/fstab
# /etc/fstab: static file system information
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda2
UUID=88e4e9db-0d5d-4055-bb36-6c4bc3454cb3 / btrfs rw,relatime,space_cache 0 0
# /dev/sda1
UUID=df2d9bbc-ab0a-42a5-96ae-7c90f0c15a0e /boot ext3 rw,relatime,data=ordered 0 2
These are the subvolumes:
~/bin > btrfs subvol list /mnt
ID 260 gen 5129 top level 5 path SB0
ID 264 gen 4975 top level 260 path SB0/var/lib/machines
ID 265 gen 5092 top level 5 path SB1
SB1 is a snapshot of SB0 and both contain an arch installation
SB1 is default one:
~/bin > btrfs subvol get-default /mnt
ID 265 gen 5092 top level 5 path SB1
but if I run grub-mkconfig it picks up SB0, in my opinion the wrong one.
Please note that SB0 is currently mounted as system root:
~/bin > findmnt -o SOURCE,TARGET,FSTYPE,FSROOT /
SOURCE TARGET FSTYPE FSROOT
/dev/sda2[/SB0] / btrfs /SB0
Is it possible to tell to grub-mkconfig to not name any specific subvol ?
If you look into: /etc/grub.d/10_linux
and search for "btrfs"  it may give an hint, but I don't understand it.
many thanks in advance
Andrea
EDIT: of course, if I change kernel command line by hand (:s/SB0/SB1) it works as expected, but it's not I'm looking for, being grub.cfg an automatically generated file.
Last edited by Aklo (2015-04-28 11:11:56)

I don't use GRUB anymore, but I don't recall it requiring a specified subvolume to boot, however if you've installed to a specific subvolume (SB0 in your case), then you will need to to tell GRUB where to look more specifically than just the device and partition (/dev/sda2).
What might accomplish what you're asking for is to set up seaparate boot entries for the respective subvolumes / installation variants.  Basically manually add another "menuentry" in /boot/grub/grub.cfg and change the subvolume specified:
/boot/grub/grub.cfg
menuentry "Arch Linux - SB0" {
linux /boot/vmlinuz-linux root=/dev/sda2 rootflags=subvol=SB0
menuentry "Arch Linux - SB1" {
linux /boot/vmlinuz-linux root=/dev/sda2 rootflags=subvol=SB1
You'd need to fiddle with /etc/fstab a then since I'm pretty sure something would freak out if you tried to mount two subvolumes to / at the same time (e.g., duplicate entries with different subvolumes specified).  A much simpler solution would be separate root partitions with shared /boot and /home partitions.  Like so (subvolumes would even be optional):
/dev/sda1 ext3 /boot
/dev/sda2 btrfs / *"menuentry" in /boot/grub/grub.cfg > title "Arch Linux - SB0"
/dev/sda3 btrfs / *"menuentry" in /boot/grub/grub.cfg > title "Arch Linux - SB1"
/dev/sda4 btrfs /home
Basically you have two separate installations, which is what it sounds like you're asking for that can be selected at boot time and share a /home partition.  The fstabs in each root would only differ at the / partition entry.

Similar Messages

  • Up2date -uf changes default kernel in grub config

    I just built a new Oracle Linux 5.7 server and I configured it to boot into the Red Hat compatible kernel by default. After running up2date -uf to update all of the packages including the kernels, the grub config is automatically modified to boot back into the oracle uek kernel (default value gets switched back to 0). Is there any way to prevent the system update from changing the default kernel in the grub config?

    So that fixed it I guess.
    Before upgrade:
    # UDPATEDEFAULT specifies if new-kernel-pkg should make
    # new kernels the default
    UPDATEDEFAULT=no
    # DEFAULTKERNEL specifies the default kernel package type
    DEFAULTKERNEL=kernel
    After upgrade:
    # UDPATEDEFAULT specifies if new-kernel-pkg should make
    # new kernels the default
    UPDATEDEFAULT=no
    # DEFAULTKERNEL specifies the default kernel package type
    DEFAULTKERNEL=kernel-uek
    Also, the default value in grub.conf stays at 1 as opposed to being changed to 0. I don't understand this behavior though. Shouldn't the upgrade create an /etc/sysconfig/kernel.rpmsave or kernel.rpmnew file as opposed to just overwriting parts of the config file?
    Edited by: user8697493 on Oct 6, 2011 8:04 AM

  • Problem changing default key bindings using Oracle Terminal

    Hello,
    I'm facing a problem changing default key bindings using Oracle Terminal. I changed
    some bindings, saved them in forms60/fmrusw.res, started the generation and saved again.
    I thought that's it but it wasn't. It took no effect at all in Forms (even after recompilation) although reopening the file in Terminal showed the changes. I'm using Forms in German, which means that even the key bindings displayed in Forms are translated i.e. STRG+F1 instead if CTRL+F1,
    but I can't find a german version of this resource file, so i think it's the same resource file for all supported languages. But what is needed for the changes to take effect ?
    Thanks in advance
    STD
    null

    Hi,
    is it client/server you are working?
    if so you should not be using the fmrusw.res file because I guess your NLS_LANG is German_Germany.WE8ISO8859P1 or something like that. This means the terminal that is being opened is fmrdw.res instead of fmrusw.res and this file should be edited using Oracle Terminal.
    if you are working via the web implementation than you can open the file fmrweb.res in a text editor and change the keybindings in there. If you need to have the PC like key bindings on the web just open the fmrpcweb.res and see if it contains the German texts. If so you can either copy this file over the frmweb.res file or you can specify term=fmrpcweb.res in the serverargs parameter.
    Hope this helps.
    Kind regards,
    Frank van der Borden
    Oracle Support Services
    Netherlands

  • How to setup a btrfs subvolume and boot onto it

    I have backed up my previous laptops Arch install onto an external drive and now I have a new laptop with btrfs and I would like to rsync my previous Arch into a subvolume so I can boot into it separetely from the main current OS. Being new to btrfs, and not wanting to destroy my new installation, I was hoping someone could provide some generic step by step instructions on how to create a bootable btrfs subvolme (the rsync step is easy) and how to tweak grub to boot onto it?

    Its pretty simple actually.  You create a subvolume and you can mount the filesystem from that point.  So say I were to do:
    # btrfs subvolume create /rootfs
    I could then mount it with:
    # mount -o subvol=rootfs /dev/sda1 /mnt
    Thus, to make it so that you can mount that filesystem as the rootfs, you would need pass that mount option when the machine is booting.  This is typically done in the fstab.  But there is a small problem there since the initramfs will first mount the partition looking for /sbin/init, using the kernel command line to figure out what to do.  So you will have to modify your kernel command line in order to get it to mount the proper thing.  This can be done with the rootflags= option.
    Alternatively, you can specify /rootfs as the default subvolume.  This will make it so that if you pass no mount options to it, it will mount at subvol=rootfs.
    You should do some reading about btrfs on the btrfs wiki (the actual btrfs wiki).  Some basic knowledge about how to use things and the various tools that ship with the progs would take you a long way.  It might also keep you from unnecessarily doing various recovery things that might totally wreck the filesystem.  Remember that btrfs is still in very active development.  Make sure you have tested backups.

  • How to change default compile directory tmp_ejb?

    Dear all,
    Someone knows how to change the default directory "tmp_ejb...." in WebLogic Server
    7.0?
    This is the default directory where WebLogic Server 7.0 generates and compiles
    the EJB's declared in config.xml.
    I try to specify the attribute TmpPath="ANOTHER_TMP_LOCATION_DIRECTORY_FOR_EJB"
    in the EJBContainer node but still doesn't work.
    The same thing happens when I test this attribute on EJBComponent declaration.
    Someone knows if there is an enviroment variable that specify this tmp_ejb location
    path?
    It's false that the tmp_ejb is located where the config.xml file is placed.
    I have 3 weblogic servers and they haven't the same behaviour.
    Someone can help me??????
    Thanks.

    I ran into the same problem and was wondering if you got an aswer the question you posted in BEA's news group: "How to change default compile directory tmp_ejb?
    Thanks

  • How to change default Ovi Player store ...

    Hi, 
    I need help from you people.  
    I had installed Ovi Player. Whenever I try to open Ovi Player, the default store gets’ open is "India". I change the store location to "Germany". When I do the search for particular music, it will again take me to "India" store instead of "Germany" store. In addition, most annoying is that I have to re-login but my user id and password will not work as its different store. Also when I go via music.nokia.de and try to login, it open Ovi player and since default location is "India", it takes me to India store and my login credentials do not work.  
    I ask Nokia care on how to change default Ovi Player Store location but they are unable to provide any good answer.  
    I already un-install / re-installed but won't work. Do any of you have answer to my problem? I want my default Ovi Player location to be "Germany" instead of "India".  
    More information, my regional settings have location as “Germany” and language as “English”.  
    Please help. 
    Thanks for your response.
    Regards,
    Subhendra
    Nokia N97 Black
    RM-505
    V12.0.026
    0586701
    Solved!
    Go to Solution.

    I had got message from Nokia on how to correct this issue. This had solved the problem. Below is the mail from them ...
    Dear Chakraborty,
     Thank you for your response.
     This error is sometimes caused by a corrupted MDataStore.db3 file used by the Ovi Player.  This file will need to be deleted with the Ovi Player closed.  Then open the player and the datastore file will be rewritten by the application:
     Close Ovi Music Player and delete the MDataStore.db3 file:
     Vista C:\Users\<user>\AppData\Local\Nokia\Nokia Data Store\DataBase\MDataStore.db3
     XP C:\Documents and Settings\<user>\Local Settings\Application Data\Nokia\Nokia Data Store\DataBase\MDataStore.db3
     Both of these locations are in hidden folders.  So, to view them users will need to: 
     Open Windows Explorer > Tools > Folder Options > View > Show Hidden Files and Folders
    Once Ovi Music is opened again the MDataStore.db3 file will be rewritten to this folder.
      After that manipulation try to install the Ovi Player once again:
     http://europe.nokia.com/explore-services/music/nokia-music
      Best regards
     Nokia Care Team

  • How to change default ringtone to a custom one for IPhone 5.

    I have gone into settings  through Sounds made the change, but it does not register as the default even though the ringtone chosen has the checkmark beside it.  Ringtone still lists the factory default under sounds & vibrations.
    I am able to customize ringtones for individual contacts.

    user598986 wrote:
    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    ALTER TABLE  test
    MODIFY (indicator DEFAULT 'I'); 
    Incidentally, INDICATOR is a keyword in Oracle, so you may have problems using it as a column name. If so, you'll have to enclose the column name in double-quotes, and be careful to use capital letters inside the quotes.
    Edited by: Frank Kulash on Aug 26, 2009 11:42 AM

  • How to change Default Finder Windows Size?

    Hi all:
    New Finder windows show Macintosh HD and there is no problem in keeping the size or view options every time I open a new window (command + N).
    I can change "New Finder windows show" to another folder and works just as well.
    But when I open a folder in a new window (double click on an icon folder) the size of the window is very small and different from the window displayed by using command + N.
    Finder saves and applies default view options to all windows without a problem, but not the default size or in other words: 
    default windows size is different from new finder windows size.
    In Snow Leopard I could change default size of all windows holding down the Shift key while dragging and changing the size but in Mountain Lion it does not work.
    I have also deleted all files .DS_Store but neither works.
    I searched a lot but can not find a solution to this problem.
    Thanks.

    As far as New Finder Windows (command+N) are concerned, there's no problem.
    All other folder's Finder Windows I have not modified manually are displayed with the default size shown in the attached image. That is the window size that I want to modify.
    Thanks.

  • How to change default value in a table using ALTER TABLE

    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    Any help will be needful for me
    Thanks and Regards

    user598986 wrote:
    Hi,
    How to change default value in a table
    I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
    I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
    ALTER TABLE  test
    MODIFY (indicator DEFAULT 'I'); 
    Incidentally, INDICATOR is a keyword in Oracle, so you may have problems using it as a column name. If so, you'll have to enclose the column name in double-quotes, and be careful to use capital letters inside the quotes.
    Edited by: Frank Kulash on Aug 26, 2009 11:42 AM

  • I have opened two versions of Firefox (v3.6.18 and v3.5), v3.6.18 is my default browser. The problem comes after an attempt to open a HTML file.

    I have opened two versions of Firefox (v3.6.18 and v3.5), v3.6.18 is my default browser. The problem comes after an attempt to open a HTML file. An error appears: "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system." Why wouldn't it just open on my default browser? Thanks for the help!

    A possible cause is security software (firewall) that blocks or restricts Firefox without informing you about that, maybe after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox.
    See [[Firewalls]] and http://kb.mozillazine.org/Firewalls
    http://kb.mozillazine.org/Browser_will_not_start_up

  • I have changed default language in the program & have set Language & region in system preferences. My Word (Mac2011) keeps on changing the default language to US english every time I check. Please help!

    I have changed default language in the program & have set Language & region in system preferences. My Word (Mac2011) keeps on changing the default language to US english every time I check. Please help!

    If you're having trouble making changes to files that are inside your home folder (represented by a house icon in the sidebar of a Finder window), or if you can't get changes to the settings of an application to stick, then please see below.
    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    I've tested these instructions only with the Safari web browser. If you use another browser, they may not work as described.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR..; sudo chown -R $UID:staff ~ $_; sudo chmod -R u+rwX ~ $_; chmod -R -N ~ $_; } 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password. Nothing will be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take a few minutes to run, or perhaps longer if you have literally millions of files in your home folder. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Boot into Recovery. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password dialog will open. You’re not going to reset a password.
    In the dialog, select the startup volume ("Macintosh HD," unless you gave it a different name) if it's not already selected.
    Select your username from the menu labeled Select the user account if it's not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Itune was not installed and i defaulted to pictures to open iphone how do i change default to itune or nothing?

    Itune was not installed and i defaulted to pictures to open iphone 5s in windows 8, how do i change default to itune or nothing?

    You need to try and explain your problem again. I'm not exactly sure what you are trying to describe the problem as. What do you mean you defaulted pictures to open phone? What default are you referring to here?
    You can import pictures from the Camera Roll of the iPhone to the computer, and you can sync pictures from the computer to the iPhone using iTunes, but I don't know what you mean when you say defaulted pictures.

  • How do I change default tab from .5 to .25 in word 2008 for mac?

    Mountain Lion
    How do I change default tab from .5 to .25 in word 2008 for mac?
    Thanks
    Message was edited by: Rafael Montserrat1
    Thanks, Rafael

    They haven't been checked as Solved, it's an option for you to choose one if the answer has solved your problem. You can mark one answer as Solved, and two as helpful. Only you, as the originator of the topic, can see these buttons.
    Sorry for the goofed answer. Most people are looking to set the margins and I looked over that you were interested in the tabs.
    To save tabs in fixed positions that will appear with every new document, you must modify the default template. You can't open the template from the desktop. If you do, it will open as a standard document. You must open it from the Open dialogue box from within Word. With Word in the foreground, press Command+O and navigate to:
    /Users/your_account/Library/Application Support/Microsoft/Office/User Templates/
    Open the file Normal.dotm
    Set your tabs and save the file. Close the template. All new documents will now open with those preset tabs.

  • Oracle change default port

    Hi,
    I need change the oracle default port from 1521 to 1523
    I changed in listener.ora and in tnsnames.ora but I have any problem to connect with 1523
    Which step I have to perform to change default port?

    Raf Royal wrote:
    Hi,
    I need change the oracle default port from 1521 to 1523
    I changed in listener.ora and in tnsnames.ora but I have any problem to connect with 1523
    Which step I have to perform to change default port?Besides the utter futility of gaining anything through such a change, "I have any problem to connect with 1523" is not an actionable error message.
    I have a problem starting my car. Which step I have to perform to start my car?

  • Unable to change default write disk of Lenovo K3 Note

    I'm unable  to change default write disk of Lenovo K3 Note to sd card. At first i was able to change later on the option shows only as phone storage as fixed. I tried to factory reset many times at first it works later the same issue persists. I tried the format the sd card, tried a new sd card, still no use. Please Help ...

    Hello
    How R U All ?
    hope you all are fine
    The problem that i put an 32GB SD in the mobile
    and i went to the stourge options and make the default writeing is in the SD
    and i move some apps to the sd
    but sometimes the apps that in the sd did not open
    even the photos and videos in the sd the mobile did not recognise it at all
    its seems like the mobile didnt recognise the SD at all
    and to solve this problem i forced to restart the device
    have anyone have the same problem?
    Admin note; threads merged, subjects edited

Maybe you are looking for