[Boot Windows by default]

Asked by Patrick Tobin

I have downloaded Ubuntu Netbook iso to a USB drive and installed it along with the original Win Vista on my LIfebook Vseries notebook. I need Windows to boot by default and all the instructions for newbies I've found talk about editing /boot/grub/menu.lst. When I go looking and loading menu.lst using either gedit or vi a blank page opens. I gather this is because the file doesn't exist (grub-pc) or it is read only? If it was read only it should still appear as readable text I would think.

When the boot menu appears, and before an OS is selected, I can hit 'e' to edit any of the individual OS entries on the list but I can't change the list itself or the default entry. I even tried booting from the thumb drive and getting to hd0,0 looking for menu.lst to no avail. I feel clever enough to have figured out that the terminal program is where the action is and is reminiscent of DOS shell but I'm very rusty.

Can anyone walk me through this process? I'm assuming most of the solutions are out of date due to Unbunto 10.something and grub-pc. The boot menu shows "GNU GRUB version 1.98+20100804-5ubuntu3".

Patrick.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Patrick Tobin
Solved:
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

No they are not out of date at all. JUst because someting isn't as recent as your tastes would like doesn't mean they are any less relevant.

You set the default in

gksudo gedit /etc/default/grub

GRUB_DEFAULT=0

Sets the default, boot and look at the screen, the top line is line 0, the next is line 1 and so on, set the number to the entry and save the new file, then run:

sudo update-grub

Reboot to test

Revision history for this message
Sam_ (and-sam) said :
#3
Revision history for this message
delance (olivier-delance) said :
#4

https://help.ubuntu.com/community/Grub2#Configuring%20GRUB%202
   use solution with:

   GRUB_DEFAULT="xxxx" An exact menu entry, including the quotation symbols, may also be used. In this case, location in the menu will not matter. Example: GRUB_DEFAULT="Ubuntu, Linux 2.6.31-9-generic"

If you choose solution with number, you will have to change default file each time you get a new kernel.
You should find the exact name in /etc/grub/grub.cfg in section 40.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

menu.lst is in grub legacy. Grub2 is more complex and uses grub.cfg which is generated so don't bother editting it

Revision history for this message
Patrick Tobin (altoviolinist) said :
#6

OK, I can get something with sudo gedit /etc/default/grub.
I can edit the GRUB_DEFAULT=5 and even save it. It gets saved somewhere as menu.lst.
I used sudo update-grub after closing gedit.

All this still does not work. Ubuntu still is the default OS after rebooting to test.

I then tried editing GRUB_DEFAULT= "Windows Vista (loader) (on /dev/sda1)" which is the exact string in the boot menu.
It didn't like the '(' character. I then tried only "Windows Vista" and update-grub complained of an unexpected EOF.

Can I get a job testing "idiot proof" software?

Revision history for this message
delance (olivier-delance) said :
#7

Set again GRUB_DEFAULT to 0.In folder /etc/grub.d, rename file 30_os-prober to 09_os-prober and run "sudo update-grub". Now Windows will be installed in menu before Linux kernels at first place. This solution is "usual" and tested!

I will check Thursday the other solution I found in Grub2 manual, which doesn't look so simple!

Revision history for this message
Tom (tom6) said :
#8

There are a couple of things i usually do. HOw about moving Windows to the top of the boot-menu?

Launchpad question
https://answers.launchpad.net/ubuntu/+source/grub2/+question/108890

Marc Stewart said on 2010-04-30: "It's trivial to move Windows to the top of the GRUB2 menu. Open a terminal and enter:

cd /etc/grub.d
sudo mv 30_os-prober 08_os-prober
sudo update-grub

That'll make GRUB look for non-Linux OSes first, putting Windows at the top."

I tend to also put the windows buttons back on the right, smae as Windows rather than the dfault Mac side

gconftool-2 --set "/apps/metacity/general/button_layout" --type string "menu:minimize,maximize,close"

Note that should be all on one line and i don't know how to put them back afterwards!
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#9

Hi :)

If you follow my advice you will need to reset the Default to 1 (or is it 0?)
Regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#10

Hi again :)

It would be better to have Windows at the top of the boot-menu because new entries keep getting added for Ubuntu as you get new kernels added to the list, so anything at the bottom of the list keeps getting pushed further down. By putting Windows at the top you can be certain (reasonably certain anyway) that it will remain there so you don't need to keep changing the number for default all the time.

Ok, so the way to do that is open a terminal

Applications - Accessories - Terminal

and then enter these 3 lines

cd /etc/grub.d
sudo mv 30_os-prober 08_os-prober
sudo update-grub

and that should magically fix it. Since you have been messing around with grub2 quite a lot now you might find you need to reinstall it. so here is a guide to reinstall grub2 and then do those 3 magic lines straight afterwards to avoid needing to mess around with changing Default
https://help.ubuntu.com/community/Grub2#Reinstalling%20GRUB%202

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#11

Hi again again :)

Err, don't worry about messing things up and finding yourself getting deeper and deeper in trouble. It happened to most of us at the start but we mostly found ways of working around the problems and now try to help other people. The toughest part of using linux is all at the start. After you have installed it and got it running the way you like you will find that just using it is incredibly simple. Unfortunately it almost never comes pre-installed so you often have to go through this before you have had a chance to get used to linux.

Have you backed-up your data onto an external drive? Have you set-up a separate partition for your /home? If you haven't already then those are 2 good steps to take before going much further! After doing that things become much less of a worry. We can help you with getting your /home onto a separate partition and then reinstalls are much safer.
Regards from
Tom :)

Revision history for this message
Patrick Tobin (altoviolinist) said :
#12

Nope, nada, still doesn't work.

I put back GRUB_DEFAULT=0.

I did:
cd /etc/grub.d
sudo mv 30_os-prober 08_os-prober
sudo update-grub

No different on reboot!

Please give me the precise syntax since I am used to DOS commands which are just similar enough to have me spinning in confusion folks. I am so new to Linux it is a big deal that I can find Terminal and Get Firefox going. I have no reference or experience with Linux commands in the command line interface.

Revision history for this message
Patrick Tobin (altoviolinist) said :
#13

I figured out how to find, install, and run Startupmanager.

I changed the default operating system to Windows.

Reboot, STILL boots to Ubunto!!!!!

Checked Startupmanager again and Windows is the default setting but obviously not in the real world.

What the hell is going on here???

Revision history for this message
Tom (tom6) said :
#14

Oh, i thought that was right? Windows didn't move to the top of the list for you then?! Err it 'should' sorry
:(

There are a few tricks on a linux or unix command line try typing any command followed by "-h" or "--help", for example

firefox --help

cd --help

sudo --help

mv --help

and you get a quick help cheat-sheet on how to use the command. Sometimes the help lets you know how to access the "man[ual] pages". You can use the old Dos "dir" but the linux "ls" (lower-case "LS") gives you about the same info but colour coded. Hmm, it doesn't give the detail view unless you add a tag which i can't remeber (try "ls --help" ;) )

Also you can check exactly how you entered commands previously by tapping the up-arrow on the keyboard a few times, depending how far back you want to go. Note this goes back far beyond the last boot-up.

One of my favourites is "tab completion". Start typing a command or path-name and keep pressing the tab key after every few letters, or try a double-tap of the tab key. It either does an intelligent version of "predictive texting", very similar to mobile phones, or it gives the options taking into account what you have typed so far. Guess which OS most mobile phones use? (Not counting smart-phones).

Oh and if you are on a command-line just typing

info

help

will get you a short list of some possibilities.
Sorry this doesn't actually answer your question. Hopefully someone will give you a decent answer later. I will try to remember when i get home. I take it that you can still access Windows?
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#15

HI again :)

What order is your boot-menu in? Is Windows at the top of the list with lots of options for Ubuntu underneath and then right at the bottom various things like "Memtest"? Or is Windows still at the bottom of the list?

Please try

sudo update-grub

again and paste the output of that into here if you can. Errr, keyboard short-cuts for copy&paste don't work on the command-line but mouse paste is always good.
Regards from
Tom :

Revision history for this message
Patrick Tobin (altoviolinist) said :
#16

OK, I think the grub2 that I am able to do anything with so far is accessible to Ubuntu but obviously that is not the same grub2 somewhere out there on the boot sector or wherever it is hiding. Changes obviously have no effect in the real world. The only clue I have is that Windows loader lives on /dev/sda1.

Cold boot or warm boot, the first thing on the screen is the bios info. Screen goes blank and Grub takes over. The heading says: GNU GRUB version 1.98+20100804-5ubuntu3

Below that in a square box is the boot menu. Below the box there is the following: Minimum Emacs-like screen editing is supported, TAB lists completions. Press Ctrl-x to bootk Ctrl-c for a command-line or ESC to discard edits and return to the GRUB menu.

Here is the exact boot menu as it appears inside the box:

Ubuntu, with Linux 2.6.35-23-generic-pae
Ubuntu, with Linux 2.6.35-23-generic-pae (recovery mode)
Memory test (mentest 86+)
Memory test (memtest 86+, serial console 115200)
Windows Vista (loader) (on /dev/sda1)

Revision history for this message
Sam_ (and-sam) said :
#17

In case reinstall Grub to MBR.
https://help.ubuntu.com/community/Grub2#Reinstalling%20GRUB%202

To find out which and where Grub is, you can paste this one-liner in a terminal.
http://paste.ubuntu.com/547041/

Revision history for this message
Patrick Tobin (altoviolinist) said :
#18

Great! The "one liner" reveals the following:

[sudo] password for patrick:
/dev/sda: GRUB 2 v1.97 or higher
/dev/sda1: No GRUB 55aa
/dev/sda2: No GRUB ffd6
/dev/sda5: No GRUB 00
/dev/sda6: No GRUB 00
patrick@patrick-LifeBook-V1040:~$

I don't have a LiveCD. I transfered the Ubuntu iso to a thumb drive and then installed Ubuntu from there. I can boot from the thumb drive in a kind of demo mode or install outright but the instructions for LiveCD restoration of the Grub 2 files don't make a lot of sense to me right now.

Revision history for this message
Patrick Tobin (altoviolinist) said :
#19

I can see two "places" in the open files window that have hard disk icons. One is called "File System" and obviously contains all the Ubuntu files which would mean it is the Linux partition. The other place is called "462 GB Filesystem". This is obviously the Windows files and partition. There seems to be an invisible wall in the way to /dev/sda: which makes me think Grub 2 is outside of these partitions which would be the MBR? Do I have to make a LiveCD in order to change Grub 2 where is really lives?

I need to eat more carrots in order to see in this dark!

Revision history for this message
Tom (tom6) said :
#20

Hi :)

Great :) That does sound fairly positive. There are, of course, a few confusions on all 3 sides.

 . A question we 'need' an answer to ...
Do you have any data, files, documents, anything on your currently installed ubuntu that you care about and don't want to lose? or is all your data 'safely' in Windows?

 . fyi LiveCd = LiveUsb
When we say "LiveCd" that does include "LiveUsb" because Cd appeared first and is still the most commonly used "Live session" and the differences are fairly trivial at this level. I'm surprised we don't call it LiveFloppy. So, when we say LiveCd just boot-up with the Usb instead to get a working desktop without reinstalling ubuntu (yet).

 . Action and feedback ...
Regardless of the answer to that please could you boot into Ubuntu, Live or not doesn't make a difference. Get to a command-line again and give us the output of

sudo fdisk -l

where "-l" is a lower-case "-L". This will show us all the partitions on your hard-drive. I am assuming you only have 1 hard-drive plugged in at the moment? (not counting the usb stick).

 . fyi Partitions
A single hard-drive can contain many partitions. Annoyingly, MicroSquish has never liked this idea and tries to confuse people by calling them "drives" when they are only part of a drive really.

Windows cannot cope and uses confusing names that can often change just by sticking in a usb-stick. While the "C: 'drive'" is the root partition of the Windows system the other 'names' such as "D: 'drive'", "E: 'drive'", "F: 'drive'" are unpredictable unless you happen to know the history of how that particular machine was put together. Typically D will often be a cd player that got removed so now it might sometimes be a usb-stick and sometimes, perhaps, the dvd player. E will often be a dvd player but might be a 2nd hard-drive, or might be a 2nd partition on the same internal hard-drive or it might be the usb-stick. Since short-cuts and addresses depend on the letter and ignore any volume labels these will often break. If you have something set-up in the registry to take into account other partitions or other hard-drives then that will often break. Luckily Windows denies the existence of any other Operating System and cannot see any other partitions except it's own (and sometimes not even that much!). By ignoring the outside world Windows manages to dominate the 'world'.

By contrast linux (developed as a re-write of unix) is designed as a multi-everything system and is designed to co-operate with other systems. So each sata (or older ide) hard-drive is given an address such as sda, sdb, sdc but optical drives are given names such as sr0, sr1.

In linux, partitions on hard-drives are addressed by numbers - effectively like the idea of co-ordinates on a map. So sda1, sda2, sda5, sda6 and sda7 are all clearly on the 1st drive whereas sdb1 & sdb2 are on the 2nd drive or usb-stick.

If you plug-in or remove a usb-stick none of those sda numbers will change. Add a new partition to sda even if the new partition is placed earlier than existing partitions and still those partitions will keep the same name/number/address. This is why you often get a warning from "sudo fdisk -l" which states that "Partitions may not appear on the disk in the same order as shown numerically".

However, in the last 2 or 3 years, our user-base has increased alarmingly and with most of us being from the confusing world of Windows. We are more comfortable with vague names but get confused by precise co-ordinates so the "Volume Labels" idea has been pushed into our "Places" menu. If a partition does not have a Volume Label then it gets called something like "21 GB File-system".

Unfortunately at the same time a bunch of people that keep swapping around their hard-drives have pushed for the names in our /media folder to show uuid numbers. Grrr! This sort of thing does happen occasionally but generally settles down to something both sets of people can be happy with. Fortunately when you assign a Volume Label to a partition the /media folder shows the Volume Label, not the uuid number :) So it is only the partitions shown as "File-system" in the "Places" menu that are confusing.

I think that giving linux partitions a sensible Volume Label has just become fairly important in the last few releases of Ubuntu, probably for most other distros too with the possible exception of pure-linux Slackware ones ;) Giving a Vista partition a Volume Label is risky although it should be safer to do that from inside Vista. Xp has been quite co-operative but i have not played around with Win7 much yet. Allegedly Win7 is safer again where Vista was flaky but i haven't pushed it yet.

 . fyi MBR
A single hard-drive has 1 MBR and this is really only to point at where the main part of the active boot-loader is. Each boot-loader has at least 2 parts, one for the MBR and the rest on a partition, by default it will be on your "root" linux partition. Since the MBR can only contain the address of 1 boot-loader it is generally the relevant part of whichever boot-loader you installed (or 'fixed') last. Whenever you install or reinstall Grub2 it puts the relevant part of itself into the MBR.

Each internal hard-drive, external hard-drive, usb-stick, memory card, optical drive (cd or dvd) and such-like has an MBR or similar. But it is not easy and generally not advisable to make a separate boot partition. In certain massively multi-boot systems where the user constantly reinstalls different distros, perhaps to do articles and reviews and where the person is experienced enough then a separate /boot partition can help but otherwise it is likely to be more hassle than it is worth. You are unlikely to have created a separate /boot partition even by accident.

 . fyi Don't Worry
Most of us had to do a number of reinstalls at the start of our journey into linux-land. Hopefully we can help make that easier for you. Also most of us ran into significant troubles mostly by having fallen into bad habits that are encouraged in Windows-'world'. There are several 'classics' such as surfing the internet hunting for and trying to install Windows programs from dodgy sites instead of using a "Package Manager" to do all the work for you. Or tweaking everything to try to make Ubuntu look and feel like Windows. Easiest way is just to install "Damn Vulnerable Linux" instead of Ubuntu btw. Or tweaking everything, not because we need to (or even want to really) but just because we can! lol. But we can talk about those sorts of things later.

I hope something here helps!
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#21

Hi again :)

Err, sorry about my last post! A tad long! To answer your questions

Yes, the 462 GB File-system is likely to be your Windows partition (it's C: 'drive'). Sda is the hard-drive itself and can't contain anything outside of the partitions.

When people say you "must" use a LiveCd they often mean LiveUsb, LiveFlashCard etc will also work, the point being to use a Live session of some sort rather than an installed. However there are usually other options such as booting over a network, unplugging a boot drive from a different machine and booting from that temporarily (might need an odd option in the bios). Usually people say use a LiveCd because they don't realise that you can happily boot into the one installed on your hard-drive. Sometimes they are aware but might need tools the Live session has which the installed version doesn't (for example Gparted).

If you boot-up a Live session and go up to the top taskbar and click on

System - Administration - Gparted (or Partition Editor, depending on version)

then you get a pretty graphic showing how the partitions are laid out on your hard-drive. I would reluctantly recommend you do that but avoid doing anything, just look. Gparted is very powerful and can make things go hugely wrong very fast which would require us to guide you through data-recovery. If you do delete your Windows partition please let us know BEFORE trying to fix it!

Btw my output from Sam's one-liner was
/dev/sda: GRUB 2 v1.97 or higher
/dev/sda1: No GRUB 00
/dev/sda2: No GRUB 00
/dev/sda3: No GRUB 00
/dev/sda4: No GRUB 00
/dev/sda5: No GRUB 00
/dev/sda6: No GRUB 00
which cleverly avoids telling me anything useful. I would definitely prefer to see the output of

sudo fdisk -l

without all that grep stuff hiding things from us and the > which i don't understand.
Regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#22

Hi again again :)

Sorry for the triple post! When you boot into the installed Ubuntu it sounds as though you don't get to a desktop gui? But from the LiveUsb you do? Please let us know
Regards again from
Tom :)

Revision history for this message
Patrick Tobin (altoviolinist) said :
#23

...is all your data 'safely' in Windows?

Yes, I installed Ubuntu mainly to regain use of a Mustek 1200 CU flatbed scanner which is pretty much abandonded after win95. I found I could bring files from the Windows partition into Ubuntu but could not save anything to the Windows partition. I was saving scans to the thumbdrive.

Booted into the installed Ubuntu...Yes only one installed hard drive...No usb stick at the moment...called up Terminal...sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 bytes = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optional): 512 bytes / 512 bytes
Disk identifier: 0x7287382a

    Device Boot Start End Blocks Id System
/dev/sda1 * 1 56151 451028851 7 HPFS/NTFS
/dev/sda2 56151 60802 37356545 5 Extended
/dev/sda5 56151 60605 35777536 83 Linux
/dev/sda6 60605 60802 1577984 82 Linux swap / Solaris

Revision history for this message
Patrick Tobin (altoviolinist) said :
#24

When you boot into the installed Ubuntu it sounds as though you don't get to a desktop gui?

Yes, I get a GUI interface either way. Ubuntu only shows a directory structure or "tree" when I'm opening a file in gedit which is extremely frustrating. I can use dir in terminal but that is about as useful and DOS 1.0 and yes I'm old enough to remember messing with it. I even got windows 1.0 installed once just to play with. It was suspiciously similar to DOS Shell in DOS 6 if I remember correctly. My experience mostly dates from the last century, quite literally!

Revision history for this message
Patrick Tobin (altoviolinist) said :
#25

I have the Netbook version and I don't see Gparted anywhere. I do find KDE Partition Manager but it isn't actually installed. All I have for a taskbar in either booted or like Ubuntu shows icons for Firefox, Cheese Wecam Booth, Rhythmbox Music Player, Ubuntu Software Center, Update Manager, Workspaces, Files & Folders, Applications, and Trash. The Files & Folders shows"favorite" folders and previously opened files which is really next to useless.

I am going to boot from the USB-stick with the original iso I installed from to double check but I think we are dealing with a dumbed down version here and I can certainly relate but could use something a bit smarter!

Back in a bit.

Revision history for this message
Patrick Tobin (altoviolinist) said :
#26

I am now running "live" from the USB-stick. There are more icons on the launcher which I was calling the task bar earlier. There is a working copy of Gparted and it shows a familiar looking graphic and table of partitions. So we know that I have the tools. How do avoid flying this thing into the mountainside?

Going back to the installed Ubuntu for the time being.

Revision history for this message
Tom (tom6) said :
#27

Hi :)

Just an entirely fyi only posting this time ...

The KDE Partition Editor is usually called QtParted and looks very much like GPartEd. Many Gnome apps start with G or Gtk and many KDE ones start with K or Qt. Gnome and KDE are the biggest main DEs in linux. Ther are other Desktop Environments such as LxDE, XfCe. Normal Ubuntu uses the Gnome DE, Xubuntu uses Xfce, Kubuntu uses KDE. If you get used to Gnome and then use another distro (say Mandriva, Fedora, openSUSE) on Gnome then it all looks very very similar and tends to use the same programs.

Whichever DE you use once you get to the command-line things are almost identical across all the distros whichever DE you are using. For example GPartEd and QtPartEd both use the same command-line tool (PartEd) to do the real work while they both focus on 'just' presenting a nice gui "front-end".

You can install the right partition editor for your DE (or even the wrong one but i would avoid that) into the installed Ubuntu but it is probably easier just to reboot the machine into a LiveCd/Usb/whatever session as the partition editor is normal there already.

When you install things (such as QtPartEd) please try to use the "Ubuntu Software Centre" or some other package manager. Avoid scouting around the internet for strange things that may or may not be just what they claim to be. The package manager keeps ALL your installed programs updated. Although i prefer using a different package manager they all use the same command-line tools to do the real work (sound familiar?) and using different package managers at different times is fine but it is better to try to stick to just using 1 to get more familiar with it.

I have not used the Netbook Edition for more than a couple of minutes but almost every edition is dumbed-down by default. The trick is working out exactly how to make the adjustments you personally prefer. There are a lot of "Do this after installing Ubuntu" lists/blogs/guides out there on the internet but they all have 1 thing in common (well 2 actually), they are all designed for someone else's idea of the way things should be. Of course there is only 1 right way really and that's your own. (or in my case, my neighbour's way until i try his and then realise i had it better before).

I managed to avoid the earliest Windows and remember being infuriated by Win95 because i was never comfortable with what was going on behind the gui. Mostly i just carried on using my batch-files (linux equiv is bash-scripts i think) for quite a long time.

The netbook edition has several major advantages, especially if the scanner does work already :) It probably just needs tweaking or finding the benefit of the way things are.

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#28

Hi again :)

This time some things to try ...

Ok, on a command-line try

dir -h

ls -h

to see the differences between the tags available for the two commands that do roughly the same thing. "LS" or rather "ls" is nicer because it colour codes folders from executables from 'normal' files whereas dir doesn't.

Another thing is to open a folder and notice the "Help" menu at the top? At the bottom of that menu should be an "About blah" where blah is the name of the "file-browser". Please can you let us know which file-browser the Netbook Edition is using?

I am glad to hear you found GPartEd. I can't believe it took me half an hour to complete my last post! I must have got distracted somehow!

So far we seem to be doing quite well at avoiding the mountain-side. Actually that tends to be the way once you are more familiar with linux. Most of the problems early on that 'forced me' into a reinstall are fairly trivial to fix without doing a re-install at all. The reinstall is often just a faster route rather than wading through forums and documentation. Nicely done so far :)

Regards from
Tom :)

With most file-browser (by default in Ubuntu) i think you get 2 "panes" one showing an "explorer" type tree or more usually a sort of "Places" type menu. The other pane should show the folders and files. Going back to the left(?) pane just under the menu-bar should be the word "places" or "tree", click on that to switch between "tree" and "places" or a number of other options. Slightly to the right of that at the top-right of the pane should be a "close" "x" which should close that pane if it is a pain. Alternatively you might be able to just reduce (or increase) the width of the pane if you get the cursor in the right place such that it changes shape, as you might have seen in excel or something previously. If you don't have a mouse arrow then just try to drag the vertical divider one way or the other.

You might also find some interesting options in the "View" menu of the file-browser.

Revision history for this message
Tom (tom6) said :
#29

HI again again :)

Ok, found it :) I had created a spreadsheet to calculate how large your partitions are and to check to see if there was any empty space. I guess you know from the gparted gui that there is no wasted space, not even a small 8Mb buffer after the Windows partition.

One problem that people often run into is making the UBuntu partition tooo small. For some reason the official guides say that you can install Ubuntu onto a 4Gb (or 5) partition which is technically true but desperately unlikely for a noob and almost guarantees that Ubuntu falls over after a little use.

Fortunately you have given Ubuntu plenty of room but sadly you have not made a separate /home partition. Since you have plenty of space i think about now would be a good time to go for a 2nd install of Ubuntu! In the process we can help you change the size of your swap to help the ram more.

Linux offers options like this that Windows really has no decent equivalent of. In computing we often find that we have a working system but need to make some radical changes, such as upgrading from Xp to Win7 or from Ubuntu 8.04 to 10.04 (or installing Mandriva or another different distro to explore) or to try a different Edition (such Netbook on a machine that only has Desktop). Actually this last option is unlikely because it seems easier to just install a 2nd DE and switch-user to login to the 'new' one.

In the Windows world you often have to "burn your bridges" before you have crossed over safely! It is insane! In linux you can just set-up the 'new' one on a new partition and let grub sort the multi-boot so you can keep checking things work in the new one or keep going back to the old one until you are happy to delete the old one's parttiion. The final flourish to to do "sudo update-grub" to finalise the new boot-menu. This would leave a reasonably small (8 to 10Gb) partition to use next time you fancy upgrading or trying something different.

For your case i would want to just reinstall the same netbook edition again but this time set-up a separate /home partition. Both installs of Ubuntu would be happy sharing the same swap partition and in the future your /home could be shared by any different distros or releases that you install while exploring linux-land.

The main reason i am suggesting this is because we have no idea why your grub2 is so messed up or exactly what has happened to it. It seems quite likely that just re-installing grub2 might not be enough to fix it because the new install might try to use the same settings. Also i think you have the knowledge (with a little help) and the space to do this now. Does it sound like a good plan?

Regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#30

Hi

Ok, i think i am 'chickening out' (turkeying out?) and going to try the easier answer of reinstalling grub2 in case that works. Using the guide
https://help.ubuntu.com/community/Grub2#Reinstalling%20GRUB%202
we are now on step 4 already but you might be able to do this from the installed version of Ubuntu. I am not certain tho. You might have to do this from a Live session. If you can please do this from the Live session because then we would be more certain that it has worked.

sudo mount /dev/sda5 /mnt

sudo grub-install --root-directory=/mnt/ /dev/sda

Now reboot the machine and definitely reboot into the installed Ubuntu this time. Ok, now run the

sudo update-grub

If possible can you give us the output of that "sudo update-grub" command? Don't worry if you can't. I think that the 3 lines i gave earlier should be done next before messing around with boot-manager or anything else ...

cd /etc/grub.d

sudo mv 30_os-prober 08_os-prober

sudo update-grub

I just tried running those on my machine and the final "sudo update-grub" gave me this, slightly worrying, result

Generating grub.cfg ...
Found Ubuntu 9.04 (9.04) on /dev/sda2
Found Fedora release 13 (Goddard) on /dev/sda6
Found linux image: /boot/vmlinuz-2.6.32-26-generic
Found initrd image: /boot/initrd.img-2.6.32-26-generic
Found linux image: /boot/vmlinuz-2.6.32-25-generic
Found initrd image: /boot/initrd.img-2.6.32-25-generic
Found memtest86+ image: /boot/memtest86+.bin
done

So i think i might have troubles when i next reboot because my old release of Ubuntu 9.04 is likely to be at the top of the boot-menu and Fedora just below that with the Ubuntu i use almost always being 3rd on the list. I guess it is time for me to sort my machine a bit!

Please let us know how you got on!
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#31

Hi :)

Yes, my long-forgotten 9.04 and Fedora were at the top of the list. Fortunately ActionParsnip's advice earlier in this thread helped me set default to 8 so that i boot into 10.04 as usual now :) For your machine the Windows at the top of the list should be 0 and Ubuntu should be 1.

Regards from
Tom :)

Revision history for this message
Sam_ (and-sam) said :
#32

> /dev/sda: GRUB 2 v1.97 or higher

Grub is in MBR. Again, reinstalling Grub might solve the issue.

Revision history for this message
Patrick Tobin (altoviolinist) said :
#33

I went back an reinstalled Ubuntu from the thumb drive.
I then installed Startupmanager and designated Win Vista as the default.
This time it worked.
Windows Vista boots by default

When I select the new Ubuntu installation I now get an error message...
modprobe:FATAL: Could not load /lib/modules/2.6.35-24-generic-pae: modules.dep:
No such file or directory
After a few seconds the new Ubuntu installation boots.

I can select the old Ubuntu installations also which has an added blurb about chainloaded something in the grub entry.
It will boot also.

So technically the problem is solved but it ain't pretty!

There are some strange things with my Vista installation such as missing icons in the help and support windows which were noticed long before messing with Ubuntu.

I have been thinking of backing up data and files and trying Win 7 then adding Ubuntu again later now that I know the correct dance steps. I would be reformatting the whole drive with the win 7 so hopefully any influences of this adventure will be long gone. Should I be wary of this new combination of circumstances?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#34

If you reboot and hold shift, select recovery mode then select root and run

depmod -a; reboot

The OS will now boot just find.

Why do you not have a backup? Is your data not important to you?

Revision history for this message
Tom (tom6) said :
#35

Hi :)

Glad to hear you have had some success with this :)

Backing up files and data is faster with linux and these 2 guides might help
https://help.ubuntu.com/community/BackupYourSystem
https://help.ubuntu.com/community/rsync
Rsync (or better still grsync) can back-up the Windows side as-well as the linux side and has the advantage of keep the file's & folder's permissions the same. Of course Windows tools for doing back-ups can't even see the linux side but they tend to be fairly useless anyway as they seldom back-up data hidden in places like "Username - Application Data - ... - Kodak" or other places that Windows programs like to hide photo albums and stuff. You do still have to search out those places with linux tools but at least their existence isn't denied by linux-tools :)

While you are installing the gui front-end for rsync, predictably called "grsync" it might be worth checking to see that you have these 2 programs already installed ...
ntfsprogs
ntfs-3g
and if they aren't already then install them too. Those 2 are the ones that allow linux to easily read/write to the Windows side. To install all the stuff you need for rsync just choose the single package "grsync" and the package manager will automatically sort out all the extra bits&pieces you need.

I was hoping to help guide you through a re-install so that we could help you create a separate /home partition rather than you just jumping into a new reinstall without really gaining much from the experience. If you do a

sudo fdisk -l

you will see that you now have an extra linux partition and quite possibly an extra swap too. Also i am annoyed that you chose to ignore my advice about usign the 3 lines

cd /etc/grub.d

sudo mv 30_os-prober 08_os-prober

sudo update-grub

to sort the Windows to the top of the list and decided instead to try the same method that didn't work last time. Just changing the value for default whether through the gui "Start-up Manager" or through editing the "grub" file means that each time the kernel gets upgraded the boot-menu option for Windows will get pushed 2 lines further down the list. You will now have to keep changing the value of Default or else keep having to deleting out older kernel values which leaves your system less flexible if you get into kernel troubles (unlikely admittedly). By contrast moving Windows to the top of the list as i suggested means you never have to do anything extra. I am not annoyed at you, just at the bad advice you have been given. Since it is linux it is very easy to change things around again tho so don't worry.

If you can give us the output of "sudo fdisk -l" then we can probably help you sort "the mess" out a bit
Regards from
Tom :)