master boot help

Discussion in 'Software' started by shadetree, Feb 13, 2014.

  1. shadetree

    shadetree Private E-2

    When installing linux OS (dual boot) with xp the linux boots if no selection is made. I want the win xp to load by default if no selection is made (when restarting).
    I currently have 3 OS's, so I need to know how to set this up where u have choice of any of. Lubuntu Extra Life Extension was installed after the other two windows OS's.
     
  2. jtwdyp

    jtwdyp Private E-2

    That would depend on which boot loader your using... Since Linux is the default boot I'm guessing it's the one that came with the Lubuntu Extra Life Extension. Since thats a ubuntu derivitive I'm betting it's grub2.

    In which case you night want to have a gander at:

    http://askubuntu.com/questions/100232/how-do-i-change-the-grub-boot-order

    Hope that helps... ;)
     
  3. shadetree

    shadetree Private E-2

    Chose wrong option when installing LXLE. I am able to boot into win xp now. However, I have to scroll down and select it. Then I see screen flash real quick which shows both of my windows os's. It automatically boots into c:windows. Dont get option of booting into the other (f:windows).
    Would like the default to go to one of the windows. So it would have to be at the top of the list. I guess the link u gave would have worked had I not changed the boot locater option.
     
  4. jtwdyp

    jtwdyp Private E-2

    Sounds like more than a default boot problem. I'm not sure if I understand what's happening or not. You say you can boot one of the windows os's but not the other?.

    Is the one you call f:windows actually on a completely different hard drive, or is it just another partition on the same hard drive?

    I gather the "c:windows" is xp, which windows version is the "f:windows" ?

    Were you able to boot either version of windows before you installed LXLE? (how?)

    If you can still boot the Linux, then there is probably a way, I'm not good at booting multiple windows os, Nor with getting grub2 to work the way I want it to. But multi-booting is my thing. My gateway laptop currently boots vista, and three Linux. And my hp pavilion desktop boots xp, freedos, and 4 different linux systems. And that doesn't count the portable puppy linux I've got on flashdrives... If you'll take your time, and work with me, we may find the solution. I'm not sure how much I need to explain. If your not sure what I mean, ask and I'll try to explain better.

    For starters: if you can still boot the LXLE, then it would be helpful if you could post the output of the following command:

    Since it's a form of ubuntu, it's likely configured to use sudo rather than an actual root login for admin commands. So please open a terminal emulator, such as lxterminal, which should be there in any LXDE. Note with lxterminal, you should be able to copy/paste to/from the clipboard using the right click menu...

    Code:
    sudo fdisk -l
    Note this is the linux fdisk. it's NOT the same as the windows/dos version.and the "-l" flag tells it to list the partition table(s) information...

    Again, I'm not an expert with the newer version of the grub boot loader that I think ubuntu products usually install. But it's possible to tell a boot loader to boot the 2nd, or even the third menu item by default.

    The first step is finding out what you have. (need the "fdisk -l" output) Then we need to find out how to make it possible for you to boot your choice of any one of all three os's. Once there, the choice to get the one you want by default might be easier than you think.
     
  5. plodr

    plodr MajorGeek Super Extraordinaire Moderator Staff Member

    I triple boot PCLinux, Windows 2000 and Windows XP. They are installed on two different hard drives but I don't think that matters.

    These instructions refer to a 5 year old setup, before Grub2 existed but some parts might be applicable.

    Linux handles the boot up.
    As I boot I see 3 choices PCLinux, PCLinux Safe Mode and Windows.

    I went into /boot/grub/menu.lst and opened it with a text editor.

    The first line shows timeout. I have mine set to 10.
    The 2nd line a color scheme which I did not mess with.
    The 3rd line gfxmenu shows which hd is booting and which partition on that hd. Again the distro determined that. I did not edit it.
    The 4th line shows default. I changed mine from 0 to 3 because I wanted Windows to be the default OS booted up.

    Although the list (menu.lst) shows four choices, one of them linux-nonfb is not a menu option. I changed the default from 0 to 4 first and that did not work so once I changed it to 3, it worked.

    After I select Windows, I'm presented with two choices of Windows. For that, I went into the Windows boot.ini and moved XP up in first place rather than 2K. After a few seconds XP auto boots.

    Open perhaps /boot/grub2/menu.lst if such a thing exists and look over in a text editor what is there. Write down any changes you make so you can reverse them if they don't do what you wish.
     
  6. jtwdyp

    jtwdyp Private E-2

    Great! Your experience includes some of what mine lacks. Perhaps together we can get shadetree where he needs to go... Some of what your saying fits what I was thinking...

    If I thought shadetree had grub legacy, I'd have gone there in my first post.

    Something like it can be done with grub2, but the equivalent file is write-protected & harder to work with. Plus manually edited changes get overwritten anytime a system update needs to upgrade the kernel (vmlinuz) or initial ramdisk (initrd) file. :banghead

    There is a solution though. {see the link below} ;)

    Those are the very things I'd have him change if there wasn't a more permanent fix. I found a long tutorial for grub2 I'd recommend that shadetree give the whole thing a quick read. But if all he needs to do is change the timeout and default boot entry, he should start with this section: :cool

    http://www.dedoimedo.com/computers/grub-2.html#mozTocId315265

    I know I'm adding it to my bookmarks.

    Actually I suspect linux-nonfb is a viable option. It would boot the same PCLinuxOS, but without some initial resolution presets that some hardware didn't like.

    The grub default setting counts the first menu entry as "0" rather than "1" {which would point at the second entry...} So "3" defaults to booting the 4th menu selection. And unless there are five or more menu entries, a "default" of "4" wouldn't work because it points nowhere.

    That part I wouldn't have a clue how to do. I mean what's a "Windows boot.ini"? Win98 was still supported when I gave up on letting windows decide what to boot.{except when it would suggest safe mode that is.} :-o


    With grub2 it's called grub.cfg not menu.lst But he really would be better off following the above tutorial than making temporary changes to it.
     
  7. shadetree

    shadetree Private E-2

    ""Open perhaps /boot/grub2/menu.lst if such a thing exists and look over in a text editor what is there. Write down any changes you make so you can reverse them if they don't do what you wish."


    quote above-When u say open,here, do u mean with terminal in ( LXLE). Thanks again !!!
     
  8. shadetree

    shadetree Private E-2

    reply to jtwdyp- Bookmarked recommended page and reading when done here.
    to answer a couple of ?-F: is on same HD. I think now I just need to get rid of an invalid entry in -Windows portion of bootloader has 3 entrys. Need to set a timeout and move C: to top or (o) so it will load if no selection made
     
  9. shadetree

    shadetree Private E-2


    Code:

    sudo fdisk -l

    did not get result. typed it in then password and box would dissapear and nothing would come up.
     
  10. plodr

    plodr MajorGeek Super Extraordinaire Moderator Staff Member

    No, I do not use the terminal unless necessary. I right clicked and opened with kwrite.
    Note the rest of my sentence
    I don't remember what text editor exists in LXDE. Just googled and Leafpad is what you look for when you right click the grub2 boot file.
    I logged in as root so I wouldn't get permission errors.
     
  11. jtwdyp

    jtwdyp Private E-2

    Now I'm confused. You must have had a command prompt or you wouldn't have been prompted for the password... Ummnn you did actualy do this in a terminal such as lxterminal, and not in some pop-up run command box right?

    Are you using the same exact user account the installer made you create when you installed? (if not, then your user might not be set up for sudo)
     
  12. jtwdyp

    jtwdyp Private E-2

    Yes if he has leafpad, it would be a good choice for editing.

    But unlike PCLinuxOS, LXLE is based on Ubuntu. (You know that distro whose very name was banned from PCLinuxOS forum posts.) And Ubuntu devs don't think it's safe to even have a root login. Instead they try to make their users deal with sudo for admin tasks... :banghead

    Of course, If he can get sudo to work, he could always create a root account via
    Code:
    sudo passwd root
     
  13. jtwdyp

    jtwdyp Private E-2

    Yeah, I'd strongly recommend making those changes by editing
    the:

    GRUB DEFAULT

    and

    GRUB TIMEOUT

    values in your
    Code:
    /etc/default/grub 
    rather than making changes that will get automatically overwritten an your actual
    Code:
    /boot/grub/grub.cfg
    And don't forget to actually run the update-grub command when your finished editing /etc/default/grub...

    But do note, you don't really want to "move" the WinXP boot entry. (And you don't want to set anything to "0")...

    You do want to notice which menu choice it is durring boot.
    If it's the third item listed then you want
    Code:
    GRUB DEFAULT=2
    If it's the second item on the boot list, then you want
    Code:
    GRUB DEFAULT=1
     
  14. shadetree

    shadetree Private E-2

    :wave:major
    thanks ! fixed it !
     
  15. shadetree

    shadetree Private E-2

    cant find the marked solved button
     
  16. shadetree

    shadetree Private E-2

    Device Boot Start End Blocks Id System
    /dev/sda1 * 63 3907583 1953760+ c W95 FAT32 (LBA)

    Disk /dev/sdb: 40.0 GB, 40016019456 bytes
    240 heads, 63 sectors/track, 5169 cylinders, total 78156288 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: 0x955c955c

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 63 29075759 14537848+ 7 HPFS/NTFS/exFAT
    /dev/sdb2 29077502 78155279 24538889 f W95 Ext'd (LBA)
    /dev/sdb5 63549423 77898239 7174408+ 7 HPFS/NTFS/exFAT
    /dev/sdb6 77898303 78155279 128488+ 7 HPFS/NTFS/exFAT
    /dev/sdb7 29077504 54245375 12583936 83 Linux
    /dev/sdb8 54247424 63537151 4644864 82 Linux swap / Solaris

    Partition table entries are not in disk order
    go@go-PM800-8237:~$
    here is what i have now. having trouble with editing default . There is something i am missing.?
     
    Last edited: Feb 23, 2014
  17. shadetree

    shadetree Private E-2

    Current default text editor for LXLE desktop is Gedit. Baffled on how to make this work.
    Do not know how to "save" when using terminal. Does not recognize "save" or "done".
    Also there appears to be options for editing boot at boot up option screen. Do not know commands for or how to.
     
  18. jtwdyp

    jtwdyp Private E-2

    OK shadetree I'm not quite sure which page your on at the moment. :confused
    I mean it looks like you were looking for a solved button on Sunday Morning.

    But in the afternoon, you posted *part/most of the output of the " fdisk -l " partition data I'd asked for earlier in the thread, (before there was so much discussion) asking if you were missing something about editing the default.
    «You do know that don't want to edit the partition table right?
    * I say "part/most" because it looks like some of it scrolled off the screen before you copied it...
    I don't think it matters, but if you want to see what I mean try:
    Code:
    fdisk -l /dev/sda
    That way the /dev/sdb drive info won't push the /dev/sda "Disk" size & identifier info off the top of the screen. ;)
    »

    Then Near midnight your asking how to save from Gedit etc... :confused

    Lets try it one thing at a time...

    Don't know... I'm not thinking Majorgeeks forum gives users a method to do that. At least I can't find it either. :-o

    It might sound confusing, but Linux and Windows use completely different ways of identifying disk drives.

    With windows, D: could mean the 2nd partition on the 1st hard drive. BUT it could also mean the 1st partition of the 2nd hard drive...

    But when Linux says "/dev/sda2" it's talking about the 2nd partition on the 1st hard drive.
    When it says "/dev/sdb1" it';s talking about the 1st partition of the second hard drive.

    But what really gets confusing is that they don't always agree on which is the 1st hard drive...

    That's why I say that you appear to have about 20 gigs of dos compatible hard drive space on what Linux says is the 1st partition of the 1st hard drive {/dev/sda1}, (could be one of your windows lives there, But I suspect at least one of your windows systems calls it "D:" Which would be the one that says your other Windows is on "F:"...

    Now here (noticing the NTFS tags, I'd say that one of your Linux likely lives on about 15 gigs at "/dev/sdb1" Which it would, no doubt, call "C:"...
    Now the rest of that 40 gig drive are contained in "logical" partitions within the extended «f W95 Ext'd (LBA)» partition at "/dev/sdb2"... I don't think Windows uses or skips a letter for the extended partition, so I'd say "F:" should be "/dev/sdb6" except that 120Megs just isn't big enough. Which means «I'm guessing here» I think your "F:" windows actually must live on about 7 gigs at "/dev/sdb5"

    All that {above} confusing drive info is why I suggested just editing the default boot for now... More advanced changes would be for when {and if} you decide your ready to try some advanced configuration changes.
    Now The question of WHY your having problems changing the default may depend on how your doing it. And that in turn might be part of your editor problem {below}

    But for starters:
    Where are you trying to make that change?
    If you have grub2, I can't suggest strongly enough that you should change the the default {and the timeout value}in the "/etc/default/grub" file, All you want to change is the numbers assigned to the "GRUB_DEFAULT" and "GRUB_TIMEOUT" settings. After which, «Like it should tell you at the top of that file» you need to get the system to automatically rewrite the grub.cfg file with the new settings by running "update-grub"
    Code:
    sudo update-grub
    If you can't get that to run, let me know, and I'll try to help figure out why.

    But if you insist on making temporary changes that will get automatically undone during some update by manually editing the "/boot/grub/grub.cfg" file,

    OR if your unable to save the editing changes in the "/etc/default/grub" file, then see the editor help below...


    Do you mean that you can't get "Gedit" To save the changes. Or did you wind up using a different editor in the terminal??

    If you do mean Gedit, it's likely that the problem is related to a need for admin{root} permissions to edit the file, And in the case of the grub.cfg, they so strongly don't want you to edit that by hand that they mark it as read only (even for root)...

    This could be as simple as
    Code:
    sudo gedit /etc/default/grub
    Though it might need something like gksudo {see https://help.ubuntu.com/community/gedit} If your winding up with an editor that actually runs in the terminal, then how to save depends on which editor your using. I'm fairly sure that vi or vim would be there. but as much as it's my favorite editor, I don't think your ready to learn how to use it yet. And there is no reason why you can't type the command to start gedit from a terminal's command line prompt.

    If you mean on the screen that looks something like this:

    http://pix.toile-libre.org/upload/original/1353953772.png

    Then you should know that those editing options are for making temporary/emergency/override ONE TIME changes to the selected item's command options... I really don't think it's what your looking for.
     
  19. jtwdyp

    jtwdyp Private E-2

    Whoopsie I goofed in that last post, I said "Linux", when I meant "Windows"... And then I missed the 10 minute edit window.:-o

    So when I said:

    What I meant to say was:

    Now here (noticing the NTFS tags, I'd say that one of your WINDOWS likely lives on about 15 gigs at "/dev/sdb1" Which it would, no doubt, call "C:"...
     
  20. jtwdyp

    jtwdyp Private E-2

    I'm not sure what your exact grub menu choices are shadetree. But I edited that menu image of a grub menu to use as an visual aid to better explain what I meant when I said:

    If your menu had these choices:

    http://i62.tinypic.com/14x30ie.png

    Then if you wanted the 4th menu choice (here labeled "F:widows") to be the default, you would edit the one line in your /etc/default/grub:
    Code:
    sudo gedit /etc/default/grub
    to say:
    Code:
    GRUB_DEFAULT=3
    And if you wanted the 3rd menu choice (here labeled "Windows") to boot by default, you would edit that same line to say instead:
    Code:
    GRUB_DEFAULT=2
    Then, after saving your changes, you would run:
    Code:
    sudo update-grub
    Does this help?
     
  21. shadetree

    shadetree Private E-2

    Been advised not to edit thru (sudo gedit /etc/default/grub). Still confused. Suggested to use (sudo gedit /etc/grub.d/40_custom) and (sudo gedit /boot/grub/grub.cfg). Then I guess you clik save after you do your changes. also found that there used to be something called keditor that made this really simple, but I think no longer available. Then someone at theLXLE forum said default can not be changed to win xp.
     
  22. shadetree

    shadetree Private E-2

    GRUB DEFAULT=4 is now and should be correct for default to win xp, but it refuses, instead boots into LXLE.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds