LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-13-2016, 05:02 PM   #1
sudotanner
LQ Newbie
 
Registered: Oct 2016
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 10-13-2016, 05:05 PM   #2
sudotanner
LQ Newbie
 
Registered: Oct 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
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

Last edited by sudotanner; 10-13-2016 at 05:11 PM. Reason: Redundant info
 
Old 10-13-2016, 05:56 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,141

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Any of the disk tools (fdisk as well) can change the flag. Note that Linux bootloaders generally ignore that flag.
 
Old 10-13-2016, 06:01 PM   #4
sudotanner
LQ Newbie
 
Registered: Oct 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you for the information syg00. Since you mentioned it, how would you change the boot flag with fdisk to achieve the same outcome?
 
Old 10-13-2016, 06:08 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,141

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Can't be scripted, but from within fdisk /dev/sda, enter the command "m" as it says. Should be obvious from there.
 
Old 10-13-2016, 07:09 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,751

Rep: Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929Reputation: 5929
The linux bootloader does not use the boot flag so changing it will not do anything. What are you trying to accomplish?
 
Old 10-14-2016, 09:23 AM   #7
sudotanner
LQ Newbie
 
Registered: Oct 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-14-2016, 09:29 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
gparted handles flags on hdd's
 
Old 10-14-2016, 11:34 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
should not be needed for any newish hardware
a 10 year old server well.....

i use Gparted live cd and set it from that
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wlan0: ERROR while getting interface flag: No such device suranga1976 Linux - Newbie 1 04-12-2012 11:49 PM
How to use an ExpressCard SSD device as the boot and system storage device CharlieBucket Linux - Hardware 1 03-21-2011 11:17 PM
Device IDs Change On Boot jmoschetti45 Linux - Hardware 3 01-03-2010 04:42 PM
mkrescue Fatal: device-mapper: only linear boot device supported Molly Slackware 5 01-06-2009 04:35 PM
UL 1.0 GRUB: could not find device for /boot: not found or not a block device cma Linux - General 4 12-12-2005 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration