Find the answer to your Linux question:
Results 1 to 7 of 7
Hi , I need help in changing the bootble parttion in linux using lilo. Presently when i boot the system i will be booting from primary partition(/dev/sda1) . Is there ...
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4

    How to change bootable partition in linux.

    Hi ,
    I need help in changing the bootble parttion in linux using lilo. Presently when i boot the system i will be booting from primary partition(/dev/sda1) . Is there any command to to change the bootable partition to secondary(/dev/sda2) ? Please help me.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Hi and Welcome !

    Are you using Lilo of distro installed in /dev/sda1? Do you want to add another distro installed in /dev/sda2? Or do you want to re-install Lilo of /dev/sda2 and use /dev/sda1 for other purpose?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    Quote Originally Posted by devils casper View Post
    Hi and Welcome !

    Are you using Lilo of distro installed in /dev/sda1? Do you want to add another distro installed in /dev/sda2? Or do you want to re-install Lilo of /dev/sda2 and use /dev/sda1 for other purpose?
    My set up is such that, i have one OS on /dev/sda1(primary partion) and another on /dev/sda2(secondary partition). On both both partitions i have linux OS, only but different versions. how do i switch to another partiton using commands.

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Which Linux distros have been installed in both partitions? Are you planning to setup dual boot?

    You can add an entry of other OS in Lilo menu. Post the contents of /etc/lilo.conf file here. Post the output of fdisk -l command too.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    Quote Originally Posted by devils casper View Post
    Which Linux distros have been installed in both partitions? Are you planning to setup dual boot?

    You can add an entry of other OS in Lilo menu. Post the contents of /etc/lilo.conf file here. Post the output of fdisk -l command too.
    I am using carrier grade edition linux , i need a tool(or command) such that if i am in primary partition(/dev/sda1) after executing that command, for next reboot i need to login to other partition(/dev/sda2) .

    The contents of /etc/lilo.conf is
    boot=/dev/sda
    map=/boot/map
    install=/boot/boot.b
    disk=/dev/sda
    bios=0x80
    lba32
    verbose=0
    timeout=40

    prompt
    default=Primary
    read-only

    image=/boot/bzImage
    label=Primary
    root=/dev/md0
    append="reboot=t md=0 ip=off panic=5 quiet console=ttyS0,115200n81"
    read-only

    image=/boot/bzImage
    label=Recover
    root=/dev/sda3
    append="reboot=t ip=off panic=5 quiet console=ttyS0,115200n81"

    image=/boot/bzImage
    label=SecRoot
    root=/dev/sda2
    append="reboot=t ip=off panic=5 quiet console=ttyS0,115200n81"


    Output for fdisk -l is

    Disk /dev/hda: 2048 MB, 2048385024 bytes
    255 heads, 63 sectors/track, 249 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x3db012b3

    Device Boot Start End Blocks Id System
    /dev/hda1 * 1 5 40131 83 Linux
    /dev/hda2 6 31 208845 83 Linux
    /dev/hda3 32 36 40162+ 83 Linux
    /dev/hda4 37 62 208845 83 Linux

    Disk /dev/sda: 146.8 GB, 146815737856 bytes
    255 heads, 63 sectors/track, 17849 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x6274237a

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2 1021 8193150 fd Linux raid autodetect
    /dev/sda2 1022 2041 8193150 fd Linux raid autodetect
    /dev/sda3 2042 3061 8193150 83 Linux
    /dev/sda4 3062 17849 118784610 8e Linux LVM

    Disk /dev/md0: 8389 MB, 8389656576 bytes
    2 heads, 4 sectors/track, 2048256 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes
    Disk identifier: 0x00000000

    Disk /dev/md0 doesn't contain a valid partition table

    Disk /dev/dm-0: 4194 MB, 4194304000 bytes
    255 heads, 63 sectors/track, 509 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-0 doesn't contain a valid partition table

    Disk /dev/dm-1: 7340 MB, 7340032000 bytes
    255 heads, 63 sectors/track, 892 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-1 doesn't contain a valid partition table

    Disk /dev/dm-2: 2097 MB, 2097152000 bytes
    255 heads, 63 sectors/track, 254 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-2 doesn't contain a valid partition table

    Disk /dev/dm-3: 1048 MB, 1048576000 bytes
    255 heads, 63 sectors/track, 127 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-3 doesn't contain a valid partition table

    Disk /dev/dm-4: 8388 MB, 8388608000 bytes
    255 heads, 63 sectors/track, 1019 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-4 doesn't contain a valid partition table

    Disk /dev/dm-5: 12.5 GB, 12582912000 bytes
    255 heads, 63 sectors/track, 1529 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-5 doesn't contain a valid partition table

    Disk /dev/dm-6: 7516 MB, 7516192768 bytes
    255 heads, 63 sectors/track, 913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-6 doesn't contain a valid partition table

    Disk /dev/dm-7: 4294 MB, 4294967296 bytes
    255 heads, 63 sectors/track, 522 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000000

    Disk /dev/dm-7 doesn't contain a valid partition table

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    An entry for Second partition (/dev/sda2) is available in lilo.conf file already. Set its label as default.
    Code:
    boot=/dev/sda
    map=/boot/map
    install=/boot/boot.b
    disk=/dev/sda
    bios=0x80
    lba32
    verbose=0
    timeout=40
    
    prompt
    default=SecRoot
    read-only
    
    image=/boot/bzImage
    label=Primary
    root=/dev/md0
    append="reboot=t md=0 ip=off panic=5 quiet console=ttyS0,115200n81"
    read-only
    
    image=/boot/bzImage
    label=Recover
    root=/dev/sda3
    append="reboot=t ip=off panic=5 quiet console=ttyS0,115200n81"
    
    image=/boot/bzImage
    label=SecRoot
    root=/dev/sda2
    append="reboot=t ip=off panic=5 quiet console=ttyS0,115200n81"
    Make sure to execute lilo command as root after editing lilo.conf file.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #7
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    Quote Originally Posted by devils casper View Post
    An entry for Second partition (/dev/sda2) is available in lilo.conf file already. Set its label as default.
    Code:
    boot=/dev/sda
    map=/boot/map
    install=/boot/boot.b
    disk=/dev/sda
    bios=0x80
    lba32
    verbose=0
    timeout=40
    
    prompt
    default=SecRoot
    read-only
    
    image=/boot/bzImage
    label=Primary
    root=/dev/md0
    append="reboot=t md=0 ip=off panic=5 quiet console=ttyS0,115200n81"
    read-only
    
    image=/boot/bzImage
    label=Recover
    root=/dev/sda3
    append="reboot=t ip=off panic=5 quiet console=ttyS0,115200n81"
    
    image=/boot/bzImage
    label=SecRoot
    root=/dev/sda2
    append="reboot=t ip=off panic=5 quiet console=ttyS0,115200n81"
    Make sure to execute lilo command as root after editing lilo.conf file.

    Is there any other way of doing this other than modifying the lilo.conf file?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...