LinuxQuestions.org
Review your favorite Linux distribution.
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 03-16-2016, 03:35 PM   #1
paperbagperson
LQ Newbie
 
Registered: Mar 2016
Posts: 10

Rep: Reputation: Disabled
Toggling Bootable Option Using cfdisk


I'm playing around with cfdisk and basically here's what I did:


Code:
root@test:/# fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00058c37

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      487423      242688   fd  Linux raid autodetect
/dev/sda2          487424   957517823   478515200   fd  Linux raid autodetect
Code:
root@test:/# cfdisk /dev/sda
Toggled bootable, then wrote the new partition table to the disk.

Code:
root@test:/# fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00058c37

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048      487423      242688   fd  Linux raid autodetect
/dev/sda2          487424   957517823   478515200   fd  Linux raid autodetect
When I wrote the partition table it warned me that I could destroy data. I assume this is a generic warning in case I changed something like size. I'm still left wondering though:
1. What did I change about the disk?
2. Was any data destroyed?
3. Is there somewhere I can check to see the difference?

Thanks
 
Old 03-16-2016, 08:10 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,959

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
You changed the state of just one bit in the partition table in the MBR. It is a bit that is significant only to DOS/Windows boot loaders. No Linux boot loader cares about it. To see the difference you would have to have saved an image of the first sector of /dev/sda and compare that with the changed sector. You would see that the byte at decimal offset 446 changed from 0x80 to 0.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How can i make a bootable disk with cfdisk on gpt label? papear Linux - Newbie 1 04-04-2015 05:21 AM
"bootable flag" option under swap area configuration m4rtin Linux - Server 4 08-27-2010 04:41 AM
toggling network interfaces beer.h Slackware 2 06-19-2006 02:30 PM
toggling touchpad BCarey Linux - Laptop and Netbook 5 05-12-2006 01:10 PM
cfdisk and bootable flag HippieCat Slackware - Installation 1 08-30-2005 12:24 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration