Set Bootable Partition Command Line

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












4














How to I set the bootable partition using the command line in parted?



Ideally I would like a numbered list so I can select which partition to boot from easily.










share|improve this question

















  • 1




    How to set a partition flag is explained in the manual and should be a trivial task... You can't have numbered lists when you set a flag but you can always print the device layout (which is a numbered list) and inspect it before setting any flags.
    – don_crissti
    Feb 8 '17 at 12:24
















4














How to I set the bootable partition using the command line in parted?



Ideally I would like a numbered list so I can select which partition to boot from easily.










share|improve this question

















  • 1




    How to set a partition flag is explained in the manual and should be a trivial task... You can't have numbered lists when you set a flag but you can always print the device layout (which is a numbered list) and inspect it before setting any flags.
    – don_crissti
    Feb 8 '17 at 12:24














4












4








4


2





How to I set the bootable partition using the command line in parted?



Ideally I would like a numbered list so I can select which partition to boot from easily.










share|improve this question













How to I set the bootable partition using the command line in parted?



Ideally I would like a numbered list so I can select which partition to boot from easily.







parted






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 8 '17 at 10:39









William

3191214




3191214







  • 1




    How to set a partition flag is explained in the manual and should be a trivial task... You can't have numbered lists when you set a flag but you can always print the device layout (which is a numbered list) and inspect it before setting any flags.
    – don_crissti
    Feb 8 '17 at 12:24













  • 1




    How to set a partition flag is explained in the manual and should be a trivial task... You can't have numbered lists when you set a flag but you can always print the device layout (which is a numbered list) and inspect it before setting any flags.
    – don_crissti
    Feb 8 '17 at 12:24








1




1




How to set a partition flag is explained in the manual and should be a trivial task... You can't have numbered lists when you set a flag but you can always print the device layout (which is a numbered list) and inspect it before setting any flags.
– don_crissti
Feb 8 '17 at 12:24





How to set a partition flag is explained in the manual and should be a trivial task... You can't have numbered lists when you set a flag but you can always print the device layout (which is a numbered list) and inspect it before setting any flags.
– don_crissti
Feb 8 '17 at 12:24











2 Answers
2






active

oldest

votes


















7














I use fdisk. before to apply this I recommend to work with a live CD or USB and back up your data.



First check if any bootable partition is present like in my system wich "/dev/sda1" is the bootable partition :



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: 0x00003256

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 959991807 479994880 83 Linux
/dev/sda2 959993854 976766975 8386561 5 Extended
/dev/sda5 959993856 976766975 8386560 82 Linux swap / Solaris


If there is not any boot partition do like this with root login :



fdisk /dev/sda
Command (m for help): m

Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): a
Partition number (1-5):


You've to type 1 if you want to make bootable the partition 1 or and following 2 if you want to make bootable the second partition etc...



and aply the modification with "w" like this



Command (m for help): w


For modify the table of your disk and make the desired partition bootable.



In hoping that help






share|improve this answer




























    2














    With the print command you ge the partition number (first column). Let us say it is 1. To make it bootable:



    (parted) set 1 boot on





    share|improve this answer




















    • Worth noting that you can do this in the GUI very easily; right click the partition you want, flags, click boot.
      – Owen Versteeg
      Mar 27 '18 at 3:28










    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%2f343429%2fset-bootable-partition-command-line%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    7














    I use fdisk. before to apply this I recommend to work with a live CD or USB and back up your data.



    First check if any bootable partition is present like in my system wich "/dev/sda1" is the bootable partition :



    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: 0x00003256

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 959991807 479994880 83 Linux
    /dev/sda2 959993854 976766975 8386561 5 Extended
    /dev/sda5 959993856 976766975 8386560 82 Linux swap / Solaris


    If there is not any boot partition do like this with root login :



    fdisk /dev/sda
    Command (m for help): m

    Command action
    a toggle a bootable flag
    b edit bsd disklabel
    c toggle the dos compatibility flag
    d delete a partition
    l list known partition types
    m print this menu
    n add a new partition
    o create a new empty DOS partition table
    p print the partition table
    q quit without saving changes
    s create a new empty Sun disklabel
    t change a partition's system id
    u change display/entry units
    v verify the partition table
    w write table to disk and exit
    x extra functionality (experts only)

    Command (m for help): a
    Partition number (1-5):


    You've to type 1 if you want to make bootable the partition 1 or and following 2 if you want to make bootable the second partition etc...



    and aply the modification with "w" like this



    Command (m for help): w


    For modify the table of your disk and make the desired partition bootable.



    In hoping that help






    share|improve this answer

























      7














      I use fdisk. before to apply this I recommend to work with a live CD or USB and back up your data.



      First check if any bootable partition is present like in my system wich "/dev/sda1" is the bootable partition :



      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: 0x00003256

      Device Boot Start End Blocks Id System
      /dev/sda1 * 2048 959991807 479994880 83 Linux
      /dev/sda2 959993854 976766975 8386561 5 Extended
      /dev/sda5 959993856 976766975 8386560 82 Linux swap / Solaris


      If there is not any boot partition do like this with root login :



      fdisk /dev/sda
      Command (m for help): m

      Command action
      a toggle a bootable flag
      b edit bsd disklabel
      c toggle the dos compatibility flag
      d delete a partition
      l list known partition types
      m print this menu
      n add a new partition
      o create a new empty DOS partition table
      p print the partition table
      q quit without saving changes
      s create a new empty Sun disklabel
      t change a partition's system id
      u change display/entry units
      v verify the partition table
      w write table to disk and exit
      x extra functionality (experts only)

      Command (m for help): a
      Partition number (1-5):


      You've to type 1 if you want to make bootable the partition 1 or and following 2 if you want to make bootable the second partition etc...



      and aply the modification with "w" like this



      Command (m for help): w


      For modify the table of your disk and make the desired partition bootable.



      In hoping that help






      share|improve this answer























        7












        7








        7






        I use fdisk. before to apply this I recommend to work with a live CD or USB and back up your data.



        First check if any bootable partition is present like in my system wich "/dev/sda1" is the bootable partition :



        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: 0x00003256

        Device Boot Start End Blocks Id System
        /dev/sda1 * 2048 959991807 479994880 83 Linux
        /dev/sda2 959993854 976766975 8386561 5 Extended
        /dev/sda5 959993856 976766975 8386560 82 Linux swap / Solaris


        If there is not any boot partition do like this with root login :



        fdisk /dev/sda
        Command (m for help): m

        Command action
        a toggle a bootable flag
        b edit bsd disklabel
        c toggle the dos compatibility flag
        d delete a partition
        l list known partition types
        m print this menu
        n add a new partition
        o create a new empty DOS partition table
        p print the partition table
        q quit without saving changes
        s create a new empty Sun disklabel
        t change a partition's system id
        u change display/entry units
        v verify the partition table
        w write table to disk and exit
        x extra functionality (experts only)

        Command (m for help): a
        Partition number (1-5):


        You've to type 1 if you want to make bootable the partition 1 or and following 2 if you want to make bootable the second partition etc...



        and aply the modification with "w" like this



        Command (m for help): w


        For modify the table of your disk and make the desired partition bootable.



        In hoping that help






        share|improve this answer












        I use fdisk. before to apply this I recommend to work with a live CD or USB and back up your data.



        First check if any bootable partition is present like in my system wich "/dev/sda1" is the bootable partition :



        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: 0x00003256

        Device Boot Start End Blocks Id System
        /dev/sda1 * 2048 959991807 479994880 83 Linux
        /dev/sda2 959993854 976766975 8386561 5 Extended
        /dev/sda5 959993856 976766975 8386560 82 Linux swap / Solaris


        If there is not any boot partition do like this with root login :



        fdisk /dev/sda
        Command (m for help): m

        Command action
        a toggle a bootable flag
        b edit bsd disklabel
        c toggle the dos compatibility flag
        d delete a partition
        l list known partition types
        m print this menu
        n add a new partition
        o create a new empty DOS partition table
        p print the partition table
        q quit without saving changes
        s create a new empty Sun disklabel
        t change a partition's system id
        u change display/entry units
        v verify the partition table
        w write table to disk and exit
        x extra functionality (experts only)

        Command (m for help): a
        Partition number (1-5):


        You've to type 1 if you want to make bootable the partition 1 or and following 2 if you want to make bootable the second partition etc...



        and aply the modification with "w" like this



        Command (m for help): w


        For modify the table of your disk and make the desired partition bootable.



        In hoping that help







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 8 '17 at 16:30









        dubis

        5131516




        5131516























            2














            With the print command you ge the partition number (first column). Let us say it is 1. To make it bootable:



            (parted) set 1 boot on





            share|improve this answer




















            • Worth noting that you can do this in the GUI very easily; right click the partition you want, flags, click boot.
              – Owen Versteeg
              Mar 27 '18 at 3:28















            2














            With the print command you ge the partition number (first column). Let us say it is 1. To make it bootable:



            (parted) set 1 boot on





            share|improve this answer




















            • Worth noting that you can do this in the GUI very easily; right click the partition you want, flags, click boot.
              – Owen Versteeg
              Mar 27 '18 at 3:28













            2












            2








            2






            With the print command you ge the partition number (first column). Let us say it is 1. To make it bootable:



            (parted) set 1 boot on





            share|improve this answer












            With the print command you ge the partition number (first column). Let us say it is 1. To make it bootable:



            (parted) set 1 boot on






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 7 '17 at 8:33









            robert

            106114




            106114











            • Worth noting that you can do this in the GUI very easily; right click the partition you want, flags, click boot.
              – Owen Versteeg
              Mar 27 '18 at 3:28
















            • Worth noting that you can do this in the GUI very easily; right click the partition you want, flags, click boot.
              – Owen Versteeg
              Mar 27 '18 at 3:28















            Worth noting that you can do this in the GUI very easily; right click the partition you want, flags, click boot.
            – Owen Versteeg
            Mar 27 '18 at 3:28




            Worth noting that you can do this in the GUI very easily; right click the partition you want, flags, click boot.
            – Owen Versteeg
            Mar 27 '18 at 3:28

















            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f343429%2fset-bootable-partition-command-line%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

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay