The online racing simulator
Serious Bootloader Issues...
(71 posts, started )
Quote from Jakg :Not quite sure how to use fdisk (as in, I dont know what the discs name is), but heres my grub.cfg (using Grub 2):

garbage


holy jeez...

whatever happened to...

title Windows
root (hd0,0)
chainload +1
boot

...?

note to self, never help an ubuntu user again.
Quote from bunder9999 :note to self, never help an ubuntu user again.

PROTIP: Gentoo has GRUB2, and Ubuntu has grub-legacy aswell.

Also, shouldn't you be unrolling loops and aligning jumps?
#53 - Jakg
Quote from E.Reiljans :Jakg, when installing ubuntu, don't use automatic partitioning. Split a few tens of GB's from your windows partition using GParted, (but leave 100 MB NTFS partition intact!!!) and create single ext4 partition for / of your Ubuntu (you need no swap with your 8 GB of RAM, and separate /boot isn't needed cause GRUB2 supports ext4 fully). Also, make sure 100 MB NTFS partition has 'boot' flag (GParted can set it if it's not present).

I manually created a ~35GB ext4 partition, and then a 6GB swap partition. It's for my netbook (N270 / 3GB of RAM) so it needs all the help it can get.

Will try editing the Grub config file... think it's Grub2, though.
Quote from E.Reiljans :PROTIP: Gentoo has GRUB2

where? unless it has a different name, or is in an unofficial portage overlay such as sunrise, i'd have to believe you're mistaken.

Quote :# emerge -s grub
Searching...
[ Results for search key : grub ]
[ Applications found : 5 ]
* app-admin/grubconfig [ Masked ]
* kde-misc/kgrubeditor [ Masked ]
* media-gfx/grub-splashes
* sys-boot/grub
Latest version available: 0.97-r10
Latest version installed: 0.97-r10
Size of files: 1,035 kB
Homepage: http://www.gnu.org/software/grub/
Description: GNU GRUB Legacy boot loader
License: GPL-2
* sys-boot/grub-static

Quote from E.Reiljans :Also, shouldn't you be unrolling loops and aligning jumps?

sorry, but that's just a stereotype.
#55 - arco
Quote from Jakg :Not quite sure how to use fdisk (as in, I dont know what the discs name is)

sudo fdisk -l /dev/sda

You can also use Windows bootloader to boot Windows and Linux, instead of Grub. Maybe that will work better. Just make sure when installing Ubuntu that you don't install Grub loader to the mbr, but to the Ubuntu partition. Then you can use EasyBCD in Windows to manage the bootloader.
Quote from bunder9999 :where? unless it has a different name, or is in an unofficial portage overlay such as sunrise, i'd have to believe you're mistaken.

echo "<sys-boot/grub-9999 **">>/etc/portage/package.keywords

#57 - Jakg
Quote from arco :sudo fdisk -l /dev/sda

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6e1e3a9b

Device Boot Start End Blocks Id System
/dev/sda1 1 33526 269292423+ 7 HPFS/NTFS
/dev/sda2 * 33527 33557 249007+ 7 HPFS/NTFS
/dev/sda3 33558 38914 43023361 5 Extended
/dev/sda5 33558 38167 37022720 83 Linux
/dev/sda6 38167 38914 5999616 82 Linux swap / Solaris

That's kinda weird disk parititioning, I'd expect Win7 to create it's boot partition first on the disk. Anyway, after some research I found this.

There should be a file called "40_custom" in "/etc/grub.d". Open this file with root privileges ("sudo gedit /etc/grub.d/40_custom" will do that) and append following to the file.


menuentry "Windows 7 (custom)" {
insmod part_msdos
insmod ntfs
set root=(hd0,2)
chainloader +1
}

Save the file and run "sudo chmod +x /etc/grub.d/40_custom". Then run "update-grub2" (or something similar, Ubuntu guys like to pointlessly rename stuff) and reboot. You should see a "Windows 7 (custom)" entry in the boot menu which will hopefully get you into booting Win7. If you don't see such entry, run the chmod command above but instead of "+x" parameter try "a+x" or "u+x" and update GRUB2's config again.
Sorry for this chainpost, but a little modification just sprang to my mind If the above doesn't work, try this instead.


menuentry "Windows 7 (custom)" {
insmod ntfs
set root=(hd0,2)
parttool (hd0,2) boot+
chainloader +1
}

don't you mean (hd0,1)?

(hd0,2) would be /dev/hda3, the extended partition.

Quote from E.Reiljans :sys-boot/grub-9999

sorry, i don't go anywhere near ~ packages, unless i absolutely need to... let alone 9999 packages. if they can't be bothered to make an ebuild which pulls a certain svn revision (like mythtv does), or publish a proper release, it's not worth my time.
Actually, no. GRUB2 uses this even more screwed up partition numbering where /dev/sda1 would be hd(0,1) and /dev/sdc5 hd(2,5)...
Quote from MadCatX :Actually, no. GRUB2 uses this even more screwed up partition numbering where /dev/sda1 would be hd(0,1) and /dev/sdc5 hd(2,5)...

oh good gravy...
#63 - Jakg
Quote from MadCatX :That's kinda weird disk parititioning, I'd expect Win7 to create it's boot partition first on the disk.

It did... but something broke it so I had to make a new one. That was the first problem I had

Will try the Grub thing in a sec...
Quote from bunder9999 :don't you mean (hd0,1)?

(hd0,2) would be /dev/hda3, the extended partition.

In GRUB2, devices are counted from 0, but partitions are counted from 1.
#65 - arco
Quote from Jakg :It did... but something broke it so I had to make a new one. That was the first problem I had .

Check on the root of your windows partition if you have a boot folder. If so, then the partition you made might not even being used, as the repair you ran from the install DVD reconstructed the bootloader on the windows partition instead.
#66 - Jakg
Quote from arco :Check on the root of your windows partition if you have a boot folder. If so, then the partition you made might not even being used, as the repair you ran from the install DVD reconstructed the bootloader on the windows partition instead.

To be honest, not in the mood to mess with it!

Quote from Jakg :
Will try the Grub thing in a sec...

Just tried - despite it only really adding an extra boot option, it's somehow fixed the other "Windows" options in Grub as well.

Now i only I could find an easy way to rename / delete Grub entries, then i'd have no need to keep questioning you Linux nerds
You mean it actually worked? It's hard for me to hide how surprised I am Now if you want to get rid of the extra Win7 entries, I guess that running "sudo chmod a-x /etc/grub.d/30_os-prober" and "update-grub2" should remove those original entries leaving only the custom one...
#68 - Jakg
Quote from MadCatX :You mean it actually worked? It's hard for me to hide how surprised I am Now if you want to get rid of the extra Win7 entries, I guess that running "sudo chmod a-x /etc/grub.d/30_os-prober" and "update-grub2" should remove those original entries leaving only the custom one...

How does that now which to remove / rename? For the first days in days I have a working laptop... resisting the urge to run random commands :/
The good old GRUB used a "menu.lst" file which contained it's configuration, thus allowing user to simply edit the boot menu by editing this file. GRUB2 doesn't have any manually editable config, it uses scripts to generate it's configuration automatically instead. When you run "update-grub2", it goes through the "/etc/grub.d" directory and runs every script it finds in there. Among some others there is a "30_os-prober" script and a "40_custom" script. The "os-prober" searches your HDD's for bootloaders of other OS'es and attempts to configure GRUB2 accordingly. This apparently went wrong on your netbook, so those "Windows 7 (on /dev/sd[1-2])" options were dead. Even though they all work now, I think it's better to keep the "Windows 7 (custom)" entry 'cause that's the one that got it all sorted. So naturally you don't want the "os-prober" script to be executed when GRUB2 generates it's config. "chmod a-x" command removes the executable flag from a given file for all users, so if you run the command I posted above, "update-grub2" should ignore the "os-prober".

(I really have to find a better way to distinguish commands and file names from the ordinary text than these quotation marks....)
#70 - Jakg
Sorry to appear stupid - all I want to do is remove some entries and rename others, is there not a GUI based thing?
I feel like talking a lot tonight, so here is an explanation why there is usually no GUI interface for more advanced functions like setting up a bootloader. Feel free to skip the italics if you don't feel like reading it...

I know it seems a bit excessive to remove a menu entry through a terminal, but this is a drawback of Ubuntu and actually all of those BFU-based distros. BFU is not supposed to mess around with the bootloader settings because there is some automation to take care about this. The automation didn't quite work in your case so you had to take control and you know how is it when you modify some script-generated data. Writing a GUI for operations that should only be done by somewhat more competent users is rather pointless as this kind of users usually have no problems working with a command line. Programming any sort user interface is a piece of ugly and boring work (at least I HATE it ), so it's no wonder nobody bothers with it for things as a bootloader setup.

It's just two commands you can type in like 3 seconds. Clicking it up in some GUI would take twice as long

Serious Bootloader Issues...
(71 posts, started )
FGED GREDG RDFGDR GSFDG