How to add same Ubuntu operating system as backup to GRUB?Trouble booting CentOSHow to repair the grub on debianHow to add Puppy Linux to grub menu installed by Ubuntu?GRUB does not boot automaticallyAfter installing a new Kernel in Ubuntu 14.04, rebooting takes me to busybox initramfs. How do I mount a filesystem after that?No entries for Ubuntu after executing update-grub on CentOSA TUNE to add to the /etc/default/grub fileBoot Debian and Gentoo with Grub. Kernel Panic!How to add Ubuntu into grub on CentOSKeep kernel files in different directories

Hosting Wordpress in a EC2 Load Balanced Instance

What is the offset in a seaplane's hull?

Is every set a filtered colimit of finite sets?

Is there a name of the flying bionic bird?

Why airport relocation isn't done gradually?

What is GPS' 19 year rollover and does it present a cybersecurity issue?

What causes the sudden spool-up sound from an F-16 when enabling afterburner?

Is Social Media Science Fiction?

Lied on resume at previous job

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

Can I legally use front facing blue light in the UK?

Typesetting a double Over Dot on top of a symbol

When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

Information to fellow intern about hiring?

Could Giant Ground Sloths have been a good pack animal for the ancient Mayans?

Crop image to path created in TikZ?

Does bootstrapped regression allow for inference?

aging parents with no investments

What are the advantages and disadvantages of running one shots compared to campaigns?

Prime joint compound before latex paint?

Was there ever an axiom rendered a theorem?

How to deal with fear of taking dependencies

Is there a way to make member function NOT callable from constructor?



How to add same Ubuntu operating system as backup to GRUB?


Trouble booting CentOSHow to repair the grub on debianHow to add Puppy Linux to grub menu installed by Ubuntu?GRUB does not boot automaticallyAfter installing a new Kernel in Ubuntu 14.04, rebooting takes me to busybox initramfs. How do I mount a filesystem after that?No entries for Ubuntu after executing update-grub on CentOSA TUNE to add to the /etc/default/grub fileBoot Debian and Gentoo with Grub. Kernel Panic!How to add Ubuntu into grub on CentOSKeep kernel files in different directories






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I have 4 partitions on my hard disk:



  • 15 GB Ubuntu OS (mounted to /) - sda 2

  • 15 GB Backup (not mounted) - sda 3

  • 505 MB Grub (/boot/efi) - sda 1

  • 89 GB GB Data (mount /data) - sda 4

For LTS updates, e.g. 16.04 to 18.04, I want to copy (with dd) my first partition (sda2) to the second (sda3).
That way, I can do the release update on sda2 and if this fails, I have a backup on sda3.



I tried a lot of stuff to boot from sda3, but the menu entry doesn't show
up (I used update-grub).



Used dd command: dd if=/dev/sda2 of=/dev/sda3



My file /etc/grub.d/40_custom



#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry "Backup"
set root=(hd0,3)
linux /vmlinuz root=/dev/sda3 ro quiet splash
initrd /initrd.img



Output of update-grub



Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-curtin-settings.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-47-generic
Found initrd image: /boot/initrd.img-4.15.0-47-generic
Adding boot menu entry for EFI firmware configuration
done


My File /boot/grub/menu.lst



default 0
timeout 0
hiddenmenu

title Ubuntu 18.04.2 LTS, kernel 4.15.0-47-generic
root (hd0)
kernel /boot/vmlinuz-4.15.0-47-generic root=/dev/hda1 ro console=hvc0
initrd /boot/initrd.img-4.15.0-47-generic

title Ubuntu 18.04.2 LTS, kernel 4.15.0-47-generic (recovery mode)
root (hd0)
kernel /boot/vmlinuz-4.15.0-47-generic root=/dev/hda1 ro single
initrd /boot/initrd.img-4.15.0-47-generic









share|improve this question
























  • @terdon i added now a custom menuentry.. see above...

    – False
    Apr 5 at 8:54












  • Thank you, that's much clearer now! Did you run grub-install after update-grub? If not, no new menu entry will be created if I remember correctly.

    – terdon
    Apr 5 at 9:01












  • In the example above i only run grub-install, the menuentry is shown in grub. But it boots the same system as the original boot entry (both sda2)

    – False
    Apr 5 at 9:09











  • What? Why didn't you mention that then? What menu entry? Please tell us all of these details, it is really tiring to have to drag them out of you bit by bit like this. The more information you give us, the better our chances of understanding and helping you.

    – terdon
    Apr 5 at 9:12






  • 1





    Please check in /etc/default/grub if there is a line GRUB_DISABLE_OS_PROBER=true and change this value to false. I guess with the new setting your backup partition should be found and create a new menu entry when you run update-grub again.

    – Freddy
    Apr 5 at 9:19

















1















I have 4 partitions on my hard disk:



  • 15 GB Ubuntu OS (mounted to /) - sda 2

  • 15 GB Backup (not mounted) - sda 3

  • 505 MB Grub (/boot/efi) - sda 1

  • 89 GB GB Data (mount /data) - sda 4

For LTS updates, e.g. 16.04 to 18.04, I want to copy (with dd) my first partition (sda2) to the second (sda3).
That way, I can do the release update on sda2 and if this fails, I have a backup on sda3.



I tried a lot of stuff to boot from sda3, but the menu entry doesn't show
up (I used update-grub).



Used dd command: dd if=/dev/sda2 of=/dev/sda3



My file /etc/grub.d/40_custom



#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry "Backup"
set root=(hd0,3)
linux /vmlinuz root=/dev/sda3 ro quiet splash
initrd /initrd.img



Output of update-grub



Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-curtin-settings.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-47-generic
Found initrd image: /boot/initrd.img-4.15.0-47-generic
Adding boot menu entry for EFI firmware configuration
done


My File /boot/grub/menu.lst



default 0
timeout 0
hiddenmenu

title Ubuntu 18.04.2 LTS, kernel 4.15.0-47-generic
root (hd0)
kernel /boot/vmlinuz-4.15.0-47-generic root=/dev/hda1 ro console=hvc0
initrd /boot/initrd.img-4.15.0-47-generic

title Ubuntu 18.04.2 LTS, kernel 4.15.0-47-generic (recovery mode)
root (hd0)
kernel /boot/vmlinuz-4.15.0-47-generic root=/dev/hda1 ro single
initrd /boot/initrd.img-4.15.0-47-generic









share|improve this question
























  • @terdon i added now a custom menuentry.. see above...

    – False
    Apr 5 at 8:54












  • Thank you, that's much clearer now! Did you run grub-install after update-grub? If not, no new menu entry will be created if I remember correctly.

    – terdon
    Apr 5 at 9:01












  • In the example above i only run grub-install, the menuentry is shown in grub. But it boots the same system as the original boot entry (both sda2)

    – False
    Apr 5 at 9:09











  • What? Why didn't you mention that then? What menu entry? Please tell us all of these details, it is really tiring to have to drag them out of you bit by bit like this. The more information you give us, the better our chances of understanding and helping you.

    – terdon
    Apr 5 at 9:12






  • 1





    Please check in /etc/default/grub if there is a line GRUB_DISABLE_OS_PROBER=true and change this value to false. I guess with the new setting your backup partition should be found and create a new menu entry when you run update-grub again.

    – Freddy
    Apr 5 at 9:19













1












1








1








I have 4 partitions on my hard disk:



  • 15 GB Ubuntu OS (mounted to /) - sda 2

  • 15 GB Backup (not mounted) - sda 3

  • 505 MB Grub (/boot/efi) - sda 1

  • 89 GB GB Data (mount /data) - sda 4

For LTS updates, e.g. 16.04 to 18.04, I want to copy (with dd) my first partition (sda2) to the second (sda3).
That way, I can do the release update on sda2 and if this fails, I have a backup on sda3.



I tried a lot of stuff to boot from sda3, but the menu entry doesn't show
up (I used update-grub).



Used dd command: dd if=/dev/sda2 of=/dev/sda3



My file /etc/grub.d/40_custom



#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry "Backup"
set root=(hd0,3)
linux /vmlinuz root=/dev/sda3 ro quiet splash
initrd /initrd.img



Output of update-grub



Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-curtin-settings.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-47-generic
Found initrd image: /boot/initrd.img-4.15.0-47-generic
Adding boot menu entry for EFI firmware configuration
done


My File /boot/grub/menu.lst



default 0
timeout 0
hiddenmenu

title Ubuntu 18.04.2 LTS, kernel 4.15.0-47-generic
root (hd0)
kernel /boot/vmlinuz-4.15.0-47-generic root=/dev/hda1 ro console=hvc0
initrd /boot/initrd.img-4.15.0-47-generic

title Ubuntu 18.04.2 LTS, kernel 4.15.0-47-generic (recovery mode)
root (hd0)
kernel /boot/vmlinuz-4.15.0-47-generic root=/dev/hda1 ro single
initrd /boot/initrd.img-4.15.0-47-generic









share|improve this question
















I have 4 partitions on my hard disk:



  • 15 GB Ubuntu OS (mounted to /) - sda 2

  • 15 GB Backup (not mounted) - sda 3

  • 505 MB Grub (/boot/efi) - sda 1

  • 89 GB GB Data (mount /data) - sda 4

For LTS updates, e.g. 16.04 to 18.04, I want to copy (with dd) my first partition (sda2) to the second (sda3).
That way, I can do the release update on sda2 and if this fails, I have a backup on sda3.



I tried a lot of stuff to boot from sda3, but the menu entry doesn't show
up (I used update-grub).



Used dd command: dd if=/dev/sda2 of=/dev/sda3



My file /etc/grub.d/40_custom



#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry "Backup"
set root=(hd0,3)
linux /vmlinuz root=/dev/sda3 ro quiet splash
initrd /initrd.img



Output of update-grub



Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50-curtin-settings.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-47-generic
Found initrd image: /boot/initrd.img-4.15.0-47-generic
Adding boot menu entry for EFI firmware configuration
done


My File /boot/grub/menu.lst



default 0
timeout 0
hiddenmenu

title Ubuntu 18.04.2 LTS, kernel 4.15.0-47-generic
root (hd0)
kernel /boot/vmlinuz-4.15.0-47-generic root=/dev/hda1 ro console=hvc0
initrd /boot/initrd.img-4.15.0-47-generic

title Ubuntu 18.04.2 LTS, kernel 4.15.0-47-generic (recovery mode)
root (hd0)
kernel /boot/vmlinuz-4.15.0-47-generic root=/dev/hda1 ro single
initrd /boot/initrd.img-4.15.0-47-generic






boot partition grub2 grub






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 5 at 18:00









fra-san

2,0271620




2,0271620










asked Apr 5 at 8:14









FalseFalse

63




63












  • @terdon i added now a custom menuentry.. see above...

    – False
    Apr 5 at 8:54












  • Thank you, that's much clearer now! Did you run grub-install after update-grub? If not, no new menu entry will be created if I remember correctly.

    – terdon
    Apr 5 at 9:01












  • In the example above i only run grub-install, the menuentry is shown in grub. But it boots the same system as the original boot entry (both sda2)

    – False
    Apr 5 at 9:09











  • What? Why didn't you mention that then? What menu entry? Please tell us all of these details, it is really tiring to have to drag them out of you bit by bit like this. The more information you give us, the better our chances of understanding and helping you.

    – terdon
    Apr 5 at 9:12






  • 1





    Please check in /etc/default/grub if there is a line GRUB_DISABLE_OS_PROBER=true and change this value to false. I guess with the new setting your backup partition should be found and create a new menu entry when you run update-grub again.

    – Freddy
    Apr 5 at 9:19

















  • @terdon i added now a custom menuentry.. see above...

    – False
    Apr 5 at 8:54












  • Thank you, that's much clearer now! Did you run grub-install after update-grub? If not, no new menu entry will be created if I remember correctly.

    – terdon
    Apr 5 at 9:01












  • In the example above i only run grub-install, the menuentry is shown in grub. But it boots the same system as the original boot entry (both sda2)

    – False
    Apr 5 at 9:09











  • What? Why didn't you mention that then? What menu entry? Please tell us all of these details, it is really tiring to have to drag them out of you bit by bit like this. The more information you give us, the better our chances of understanding and helping you.

    – terdon
    Apr 5 at 9:12






  • 1





    Please check in /etc/default/grub if there is a line GRUB_DISABLE_OS_PROBER=true and change this value to false. I guess with the new setting your backup partition should be found and create a new menu entry when you run update-grub again.

    – Freddy
    Apr 5 at 9:19
















@terdon i added now a custom menuentry.. see above...

– False
Apr 5 at 8:54






@terdon i added now a custom menuentry.. see above...

– False
Apr 5 at 8:54














Thank you, that's much clearer now! Did you run grub-install after update-grub? If not, no new menu entry will be created if I remember correctly.

– terdon
Apr 5 at 9:01






Thank you, that's much clearer now! Did you run grub-install after update-grub? If not, no new menu entry will be created if I remember correctly.

– terdon
Apr 5 at 9:01














In the example above i only run grub-install, the menuentry is shown in grub. But it boots the same system as the original boot entry (both sda2)

– False
Apr 5 at 9:09





In the example above i only run grub-install, the menuentry is shown in grub. But it boots the same system as the original boot entry (both sda2)

– False
Apr 5 at 9:09













What? Why didn't you mention that then? What menu entry? Please tell us all of these details, it is really tiring to have to drag them out of you bit by bit like this. The more information you give us, the better our chances of understanding and helping you.

– terdon
Apr 5 at 9:12





What? Why didn't you mention that then? What menu entry? Please tell us all of these details, it is really tiring to have to drag them out of you bit by bit like this. The more information you give us, the better our chances of understanding and helping you.

– terdon
Apr 5 at 9:12




1




1





Please check in /etc/default/grub if there is a line GRUB_DISABLE_OS_PROBER=true and change this value to false. I guess with the new setting your backup partition should be found and create a new menu entry when you run update-grub again.

– Freddy
Apr 5 at 9:19





Please check in /etc/default/grub if there is a line GRUB_DISABLE_OS_PROBER=true and change this value to false. I guess with the new setting your backup partition should be found and create a new menu entry when you run update-grub again.

– Freddy
Apr 5 at 9:19










0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510652%2fhow-to-add-same-ubuntu-operating-system-as-backup-to-grub%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f510652%2fhow-to-add-same-ubuntu-operating-system-as-backup-to-grub%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.