LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I change the boot flag from one device to another device? SUSE (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-change-the-boot-flag-from-one-device-to-another-device-suse-4175591362/)

sudotanner 10-13-2016 05:02 PM

How can I change the boot flag from one device to another device? SUSE
 
How do you change the boot flag on one device to another device?

Here is my fdisk -l output:

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 4192255 4190208 2G 82 Linux swap / Solaris
/dev/sda2 * 4192256 976773119 972580864 463.8G 83 Linux
/dev/sda3 1044480 8388604 367252212 4.6G 83 Linux

I want to change the boot flag from /dev/sda2 to /dev/sda3. I am running SLES11 SP3.

sudotanner 10-13-2016 05:05 PM

Change boot flag from one device to another device on SUSE
 
This would be one way to do it:

parted /dev/sda -s toggle *device number* boot

In your case you would execute:

parted /dev/sda -s toggle 3 boot

syg00 10-13-2016 05:56 PM

Any of the disk tools (fdisk as well) can change the flag. Note that Linux bootloaders generally ignore that flag.

sudotanner 10-13-2016 06:01 PM

Thank you for the information syg00. Since you mentioned it, how would you change the boot flag with fdisk to achieve the same outcome?

syg00 10-13-2016 06:08 PM

Can't be scripted, but from within fdisk /dev/sda, enter the command "m" as it says. Should be obvious from there.

michaelk 10-13-2016 07:09 PM

The linux bootloader does not use the boot flag so changing it will not do anything. What are you trying to accomplish?

sudotanner 10-14-2016 09:23 AM

A server I was working on somehow had the boot flag set on the root filesystem partition instead of the boot partition. As a result I was getting errors that read:

"Error No Active Partition
Operating system not found"

I couldn't find any information online how to simply change the boot flag after booting into the installed system via CD/DVD. I figured someone, somewhere would eventually have the same issue and find this thread helpful.

BW-userx 10-14-2016 09:29 AM

gparted handles flags on hdd's

John VV 10-14-2016 11:34 PM

should not be needed for any newish hardware
a 10 year old server well.....

i use Gparted live cd and set it from that


All times are GMT -5. The time now is 02:56 PM.