Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Linux & Windows Dual Boot

  • 03-04-2007 2:26pm
    #1
    Registered Users, Registered Users 2 Posts: 2,761 ✭✭✭


    Hey Guys,

    Bit of hassle with a Dual Booting Linux & Windows machine. Windows became corrupted (or the partition containing windows) , linux should still be fine.
    Reinstalled XP again (repaired the HD aswell), and now windows is booting fine but not giving me an option to boot into Linux.

    So where it used to have a Linux / Windows option, it now just gives me XP Home / XP Pro.

    Is there an easy way to just get it to boot into Linux and keep away from windows / or give me the old option back?

    Any help would be much appreciated.

    Cheers.


Comments

  • Moderators, Science, Health & Environment Moderators Posts: 1,852 Mod ✭✭✭✭Michael Collins


    If you have your XP CD, you could try booting into the Recovery Console and try using BOOTCFG, this should allow you to add your LINUX install to the boot options and set it to default if you wish.

    Never tried it with a Linux before but it's worth a shot.

    For future reference, I usually find it better to just install the two operating systems to two different HDs, and then choose which HD to boot at startup - it keeps the two OS' completely seperate, thus avoiding annoying problems like these :D


  • Registered Users, Registered Users 2 Posts: 1,065 ✭✭✭Snowbat


    You don't say which Linux distro you're running and which bootloader you want but it usually goes something like this:
    1. Boot with the distro install CD or a live CD
    2. Become root
    3. make a directory in /mnt
    4. mount your Linux root (/) partition on this directory
    5. chroot the mounted partition
    6. grub-install /dev/hda ( <--- hda is primary master IDE drive - adjust as appropriate)
    7. Exit the shell
    8. Reboot

    More:
    http://linuxhelp.blogspot.com/2005/11/how-to-repair-corrupt-mbr-and-boot.html
    http://www.ubuntuforums.org/showthread.php?t=24113

    Also, How to back up your MBR:
    http://ubuntu.wordpress.com/2005/10/20/backing-up-the-mbr/


  • Registered Users, Registered Users 2 Posts: 3,568 ✭✭✭ethernet


    SuSE lets you boot in recovery mode from the DVD and it auto generates a GRUB script so it'll detect XP and the Linux install, allowing you to replace the MBR with the functioning loader allowing you to boot as before.


  • Registered Users, Registered Users 2 Posts: 94 ✭✭DannyBZR


    You could also reintall your linux root and leave your home partion alone, this should reinstall your bootloader and leave all your linux files in tact......


  • Registered Users, Registered Users 2 Posts: 2,761 ✭✭✭Col_Loki


    Thank you very much for the replies, i will try what ye have suggested.

    Again, Many thanks!!


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,579 ✭✭✭BopNiblets


    I have Ubuntu and XP and Vista tri-booting (just wanted to try it, heh) and the GRUB thing is a bit messy when it starts up, it has 2 entries for Ubuntu (one recovery mode) then "Other Operating Systems:" (not much use), then two entries for Windows OSes (only one of which actually takes me to the VistaBootLoader where I can select XP or Vista), so I'd like to tidy it up a bit but it wasn't immediately obvious how from the menu options!

    What I would like it to display is:
    XP
    Vista
    Ubuntu

    As I boot into XP the most, so is that easy to do?
    I realise I'm a complete n00b when it comes to Linux and roots and GRUB and such things... :\

    Also when I upgraded the Ubuntu installation (164 updates) two more Ubuntu entries appeared in the loader!
    I really only need three choices if it's at all possible, thanks. :)


  • Registered Users, Registered Users 2 Posts: 1,287 ✭✭✭joe_chicken


    BopNiblets wrote:
    Also when I upgraded the Ubuntu installation (164 updates) two more Ubuntu entries appeared in the loader!
    I really only need three choices if it's at all possible, thanks. :)

    The 2 extra options are, more than likely, Ubuntu upgrading the kernel (the core of the OS). It keeps the old kernel too, so you can boot into that if something goes wrong with the new one.

    As for changing GRUB, as with most things in Linux, there's a nice handy file we can change things in.

    On most distros it's "/etc/grub.conf" but in Ubuntu (6.10 anyway) the file is "/boot/grub/menu.lst"

    Have a google around for example files that you can copy, but it ain't that hard, just make sure you are editing the right sections:
    ....
    title		Ubuntu, kernel 2.6.10-5-386 (recovery mode)
    root		(hd0,1)
    kernel		/boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
    ....
    

    all you need to do is find something that looks like above (depending on what OS you want) and change the title.

    REMEMBER: the most important thing about changing system files in Linux is: BACK IT UP before changing it :)


  • Closed Accounts Posts: 68 ✭✭nuada


    If you have reinstalled windows then the partition(s) where you had linux were deleted by the windows installer. You can check this by seeing how big windows reports your c: drive as in My Computer.


  • Registered Users, Registered Users 2 Posts: 3,579 ✭✭✭BopNiblets


    Thanks joe_chicken, I assume it's ok to just delete the entries I don't want then?
    And how does one back it up?


  • Registered Users, Registered Users 2 Posts: 1,287 ✭✭✭joe_chicken


    BopNiblets wrote:
    Thanks joe_chicken, I assume it's ok to just delete the entries I don't want then?
    And how does one back it up?

    Yep, delete stuff you don't want:
    a) Be careful
    b) BACKUP :)

    (hate to sound like a broken record, but it is far and away the most important thing to do, and yet I still forget sometimes)

    Just copy it to your home directory.
    sudo cp /boot/grub/menu.lst ~/menu.lst.backup
    
    (the "~" means your home dir...)
    and to restore
    sudo cp ~/menu.lst.backup /boot/grub/menu.lst
    

    There's also a line in menu.lst like:
    default=0
    
    This means the first OS on the list will be booted to automatically.
    If you want to boot the second one use default=1, third default=2... etc

    and a timeout variable that corresponds to the amount of time (in secs) that GRUB waits before it boots the default OS


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,579 ✭✭✭BopNiblets


    Ok, I can't save the new menu.lst because I need root, and since I'm the only user... shouldn't I be root already? :\

    And on another non-related note, why can't Ubuntu restart my PC? It will shut down fine but it keeps running the fans and stuff and the monitor says no signal when I select restart, and I have to reset it manually.
    Strangely enough, Vista does this aswell! :\


  • Registered Users, Registered Users 2 Posts: 3,568 ✭✭✭ethernet


    BopNiblets wrote:
    Ok, I can't save the new menu.lst because I need root, and since I'm the only user... shouldn't I be root already? :\
    Don't speak such evil! Get out of that Windows mentality! :D The answer is no and it's for security reasons. This very defect has been exploited by most malicious software doing the rounds on Windows machines.
    BopNiblets wrote:
    And on another non-related note, why can't Ubuntu restart my PC? It will shut down fine but it keeps running the fans and stuff and the monitor says no signal when I select restart, and I have to reset it manually.
    Strangely enough, Vista does this aswell! :\
    Could be down to your hardware -- ACPI and all that. Are you using old hardware or even very new hardware? openSUSE doesn't always manage to shut mine down either. I just hold the power button the send the 'off' signal to the motherboard even though I can hear it spin down the hard drive.


  • Registered Users, Registered Users 2 Posts: 3,579 ✭✭✭BopNiblets


    OK I got it edited and it's working now. :)

    I had to set a root password with passwd root
    then open gedit as root and I could save it then.
    w00!


  • Registered Users, Registered Users 2 Posts: 1,287 ✭✭✭joe_chicken


    BopNiblets wrote:
    OK I got it edited and it's working now. :)

    I had to set a root password with passwd root
    then open gedit as root and I could save it then.
    w00!

    oops, yeah, should have mentioned...

    Ubuntu seems to prefer that you do everything root-related through the sudo command (a good idea I think!)

    So as apposed to logging in as root (generally not a good idea) and then editing the file, you should get into the habit of using sudo, so you would type:
    sudo gedit /boot/grub/menu.lst
    

    and then put in your own password.

    It may seem a small thing now, but root permissions can get messy, so doing things with sudo kind of cleans up things a bit.
    (i.e. you'll only use it when you absolutely have to)

    Anyway, I should stop ranting on, good to hear it's working.


  • Registered Users, Registered Users 2 Posts: 3,579 ✭✭✭BopNiblets


    Where would be a good place to learn all these command line bits and bobs and their structures? I'm sure there must be a million bajillion of them but even the main ones...

    I got the boot working, but that leaves me with trying to fins out why Ubuntu won't restart, why my MP3s play only sometimes in the Beep player (and the sound awful) and why I can't write to files on the other hard drives (My CV in my Windows Documents for example, read only, is it an NFTS thing?)

    Linux is great and free and all, but it's like getting a free apartment, with holes and damp and some tricky mazes to the toilets, and you have to learn carpentry and plumbing just to get to when you can sit back and relax and watch TV in it!

    sudo install couch! :p


  • Registered Users, Registered Users 2 Posts: 1,287 ✭✭✭joe_chicken


    Most commands I found through trying to do things.
    i.e. needing a package that was only available through source files, so I had to learn to compile source code on linux (not even remotely as hard as it sounds... most of the time :))

    If you've had a problem with Linux (Ubuntu in particular) there's more than likely a million bajillion people with the same problem, so the best way to find out how to fix it is to google your problem.

    The Ubuntu forums are full of helpful people who can help you out.

    For example, take your NTFS read/write problem,
    Ubuntu Forum

    There's 163 pages of how to get it working :) (you should only really need the first)

    Every time you install something new, you'll see the same commands pop up, and eventually they'll start seeping into your brain

    And as for installing a couch... you'd be surprised at how easy it is (as long as you have the right repositories :D)
    sudo apt-get install couch
    

    (apt-get is a great little tool for keeping things up to date and installing new packages [even games])


Advertisement