# [SOLVED] Request for GRUB Instructions



## itendo (Jan 22, 2009)

I am requesting a broader list of steps to solve the following problem as I seem to keep missing a step here and there. So where and how do i begin?

Currently, after a handful of repairs and quick-fixes and emergency live-disk backups, I have two different Karmic installs alongside my Vista install (all other pc specs in profile). When i boot up, first GRUB loads and asks for how to boot, then if i select windows it will ask if i want to boot Vista or Linux (a dead link to a WUBI install i think; stupid wubi)). Fortunately, I have 2 1T hdds and a 320g, so storage has been a luxury that afforded me to leave this mess alone.

However, I need to clean up my machine tomorrow morning and am not sure A) what tools i should be using, or B) what set-up would be ideal. Standard resons of why the Linux/Vista setup, Vista for gaming and Linux for everything else.

I am looking to set up a permanent off-site backup system (a la Crash Plan) but dont want a ton of bloat to upload. Consequently, I want to set up a shared media partition (for use locally by both Karmic Ubuntu & Vista, and other networked machines (one Karmic, the other XP)), and an OS partition for each OS. The 320 gig hdd i want to use as little as possible as it is the oldest of the drives.

I want to have an additional partition for backing up images of each OS partition (see list).

I want the end result to boot into GRUB (a la gribbit) and pick boot options from there. I am okay with wiping the Linux installs and re-freshing, but i do not want to scare Vista and have it freak out (that happens enough on its own :laugh.

Particular Concerns:

non-destructive resizing of the Vista partition
boots to GRUB, not Vista
when selecting Vista, doesnt re-ask boot option
a media partition easily read/accessed/modified by Linux and windows (NTFS best?)
as is its want, if the Vista install goes bad i would like to be able to drop an image in to replace it

I am also capable of running the two 1Ts in a RAID and mirroring according to intel's specs for the DX58SO mobo i am running, but i have been unable to get it to work.

Partitions initially sound like:
1T hdd #1 - 

50g Linux
150g(-ish) Vista
10g Linux swap
10g Vista swap
300g media
(~440g leftover)


1T hdd#2 - 

350g OS backups (2 redundant, 1 step-back stable image for windows)
300g media (mirror backup)
(~350g leftover)

320g hdd - 

200g OS backups (1 redundant for linux, 1 step-back stable image for windows)
(~120g leftover)

Thanks in advance techsupportforum, staff and commenters, youre the best out there ray:


----------



## wmorri (May 29, 2008)

*Re: Request for GRUB Instructions*

Hi,

It sounds like your grub problems aren't too bad. I would like to see your menu.lst file. This will show me everything that is in grub currently, also if you could show me what your fdisk -l looks like that would be great.

Cheers!


----------



## itendo (Jan 22, 2009)

*Re: Request for GRUB Instructions*

the probs arent bad, but my OCD kicks in every time i boot up; and i just wanted to streamline it for backup particularly. will upload files when i get home.


----------



## itendo (Jan 22, 2009)

*Re: Request for GRUB Instructions*

i'm probably doing something wrong here as /sda,b,c are not listed... nonetheless

from menu.lst:


```
# sample /boot/grub/menu.lst entry for memtest86
#
# This example assumes the contents of /boot is on the root partition.
# If your /boot is on its own partition, remove /boot from the 'kernel' line.

title  memtest86+
root   (hd0,0)
kernel /boot/memtest86+.bin

title  memtest86+ (serial console 115200)
root   (hd0,0)
kernel /boot/memtest86+.bin console=ttyS0,115200n8
```
im not sure if this should have been run as fdisk -l /dev/* but heres the output:


```
[email protected]:~$ fdisk -l
[email protected]:~$ fdisk -l /dev
last_lba(): I don't know how to handle files with mode 40755
[email protected]:~$ fdisk -l /dev/*
last_lba(): I don't know how to handle files with mode 20660
last_lba(): I don't know how to handle files with mode 20660
Cannot open /dev/binder
last_lba(): I don't know how to handle files with mode 40755
last_lba(): I don't know how to handle files with mode 40755
Note: sector size is 2048 (not 512)

Disk /dev/cdrom: 7746 MB, 7746355200 bytes
255 heads, 63 sectors/track, 235 cylinders
Units = cylinders of 16065 * 2048 = 32901120 bytes
Disk identifier: 0x00000000

Disk /dev/cdrom doesn't contain a valid partition table
Note: sector size is 2048 (not 512)

Disk /dev/cdrw: 7746 MB, 7746355200 bytes
255 heads, 63 sectors/track, 235 cylinders
Units = cylinders of 16065 * 2048 = 32901120 bytes
Disk identifier: 0x00000000

Disk /dev/cdrw doesn't contain a valid partition table
last_lba(): I don't know how to handle files with mode 40755
Cannot open /dev/console
Cannot open /dev/core
Cannot open /dev/cpu_dma_latency
last_lba(): I don't know how to handle files with mode 40755
last_lba(): I don't know how to handle files with mode 40755
Note: sector size is 2048 (not 512)

Disk /dev/dvd: 7746 MB, 7746355200 bytes
255 heads, 63 sectors/track, 235 cylinders
Units = cylinders of 16065 * 2048 = 32901120 bytes
Disk identifier: 0x00000000

Disk /dev/dvd doesn't contain a valid partition table
Note: sector size is 2048 (not 512)

Disk /dev/dvdrw: 7746 MB, 7746355200 bytes
255 heads, 63 sectors/track, 235 cylinders
Units = cylinders of 16065 * 2048 = 32901120 bytes
Disk identifier: 0x00000000

Disk /dev/dvdrw doesn't contain a valid partition table
Cannot open /dev/ecryptfs
last_lba(): I don't know how to handle files with mode 40500
last_lba(): I don't know how to handle files with mode 20666
Note: sector size is 2048 (not 512)

Disk /dev/full: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 2048 = 32901120 bytes
Disk identifier: 0x00000000

Disk /dev/full doesn't contain a valid partition table
last_lba(): I don't know how to handle files with mode 20666
Cannot open /dev/hidraw0
Cannot open /dev/hidraw1
Cannot open /dev/hidraw2
Cannot open /dev/hidraw3
Cannot open /dev/hpet
last_lba(): I don't know how to handle files with mode 40755
Cannot open /dev/kmsg
Cannot open /dev/loop0
Cannot open /dev/loop1
Cannot open /dev/loop2
Cannot open /dev/loop3
Cannot open /dev/loop4
Cannot open /dev/loop5
Cannot open /dev/loop6
Cannot open /dev/loop7
last_lba(): I don't know how to handle files with mode 40755
Cannot open /dev/mcelog
Cannot open /dev/mem
last_lba(): I don't know how to handle files with mode 20660
last_lba(): I don't know how to handle files with mode 20660
last_lba(): I don't know how to handle files with mode 40755
Cannot open /dev/network_latency
Cannot open /dev/network_throughput
last_lba(): I don't know how to handle files with mode 20666
Cannot open /dev/oldmem
last_lba(): I don't know how to handle files with mode 40755
Cannot open /dev/port
Cannot open /dev/ppp
Cannot open /dev/psaux
```
for fdisk -l /dev/full:


```
[email protected]:~$ fdisk -l /dev/full
last_lba(): I don't know how to handle files with mode 20666

Disk /dev/full: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/full doesn't contain a valid partition table
```


----------



## wmorri (May 29, 2008)

*Re: Request for GRUB Instructions*

Hi,

Hmm, is that all that was listed on your menu.lst file, or is that all there is. Also, try running this command.

```
fdisk -l  You might have to run this as sudo
```
We will figure this out yet don't worry.

Cheers!


----------



## itendo (Jan 22, 2009)

*Re: Request for GRUB Instructions*

you were right it needed elevated priveleges:


```
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xed20049d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1      121602   976759808    7  HPFS/NTFS

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7b2727b0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1      107077   860095971   83  Linux
/dev/sdb2          107078      121601   116664030    5  Extended
/dev/sdb5          120127      121601    11847906   82  Linux swap / Solaris
/dev/sdb6          107078      119590   100510609+  83  Linux
/dev/sdb7          119591      120126     4305388+  82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdc: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x150504d5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       38913   312568641   83  Linux
```


----------



## itendo (Jan 22, 2009)

*Re: Request for GRUB Instructions*

A new thorn in my side. On my last install of Vista I did a full HDD partition (hence my desire to resize and segregate the data). Unfortunately, between today and yesterday when I used Perfectdisk (and other defrag tools) to clean up the disk i still had a bunch of unmovable/excluded files. Consequently, when i tried to use diskmgmt.msc to resize the partition, i was only able to go from 931.8 gig down to 931.3 gig. thanks microsoft.

anyway, i was going to just use gPartED to resize and then deal with the fall out, but it wont let me resize, whether the drive is/n't mounted. 

it looks like im presented with two options:
a) resize the partition with something else, or a diff approach
b) new install of windows

obviously the first would be less time consuming, tho the second would be easier. I am amenable to the second (there is an ATI situation), but am afraid of overwriting GRUB again. how do i protect against that or recover or manage GRUB in the wake of reinstalling windows?

Thanks again


----------



## wmorri (May 29, 2008)

*Re: Request for GRUB Instructions*

Hi,

Here is what I would recommend. If you want to work on resizing partitions that is fine. I would start with your first 1T drive, let me show you how I would partition things up. 

Partition's to 1T -


Linux 150GB or more

Linux swap 1GB no more

Vista 150 ~

Media 300GB

Extra space 399 GB

I would recommend partitioning 150 GB for your linux partition so you will never have to worry about adding more space.

The rest of your partitions look fine. You only need a 1 GB partition swap drive for linux. This ads your ram and is used sort of like extra ram. 

I am also curious as to why you have a vista swap drive. Vista doesn't work the same way that linux does so, a swap drive does nothing.

Cheers!


----------



## itendo (Jan 22, 2009)

*Re: Request for GRUB Instructions*

I'm not sure what youre referring to with "Vista Swap Drive." I have my Vista swapfile settings set to use the second hard drive since I have read variously that there are speed improvements in Vista when you physically split the OS/applications drive from the memory drive.

Also, I have since created a new FAT partition for the temporary storage of media. I am not sure which partition format would be ideal for use between both linux and windows platforms, but would appreciate any experience on the matter before committing to a media partition format. 

I think I am going to stick to basically the partition set up you recommend, except it looks like i will be needing about 300 gig for the Vista partition.

It appears that re-installing Windows is my best option unless I can get the boot defrag program I am going to try tonight (Perfectdisk 10: http://www.perfectdisk.com/support/kb/788 ) can move the system files impeding resizing. Afterward, I will likely delete my Linux partitions and reinstall since installing Vista's MFT is probably going to corrupt GRUB and cut off my linux booting options.


----------



## wmorri (May 29, 2008)

*Re: Request for GRUB Instructions*

Hi,

Since I am not a windows guy myself, I don't know too much about the Vista swapfile, so I will take your word on that. I was confusing the swapfile for another swap partiton, and didn't understand why you were making one.

As for creating a FAT partition to use, FAT32 is the way to go, as it can be read by both windows and linux.

I don't know anything about Perfectdisk 10, but good luck with that.

Cheers!


----------



## soymoe (Nov 24, 2009)

*Re: Request for GRUB Instructions*

Use Vista Recovery disc from: http://rapidshare.com/files/223026699/Vista_Recovery_Disc_x86.iso
to fix HDD MBR. Later reinstall Grub using Linux instalation disk, include Vista OS in the Grub configuration.Good Luck.:wave:


----------



## itendo (Jan 22, 2009)

*Re: Request for GRUB Instructions*

for anyone that gets into trouble like i listed above, i was able to get my mbr pulled back together (my cardinal problem) with grub via live-cd using the following guide:

http://grub.enbug.org/Grub2LiveCdInstallGuide

afterward, i targeted the unnecessary partitions with gparted and erased (should have done prior to rebuilding grub but oh well), unmounted all and remounted all and restarted and didnt end up with any corruption (still need to clean up menu list). [fyi: (sudo apt-get install) testdisk was a great resource for recovery if you mess around in gparted too much.] with respect to getting the images/partitions to do anything i have been unable to get GRUB to boot into windows, even for the sake of repair. GRUB recognizes the windows loader, and the structure appears to be ok, but if i choose the Vista loader it goes black and does nothing else.

however, and this may not be related, my BIOS post time has gone from 3 to about 15-20 seconds, and OS boot from GRUB menu went from about 8 to 30 seconds. I would love to use the recovery disk function, but i am running into an error trying to install vista from my OEM DVD; it gets to the green (kernel) loading bar part of the menu, then hangs indefinitely (for at least 25 minutes). i thought this may have to do with bios an ide/ahci driver loading issue but in ide mode it still isnt respnding. 

im still holding out hope of getting my vista partition working again (9-button mouse hardware incompatibility in wine QQ), and then running the dd method. however, i dont know if i would just be nesting a corrupt image/partition into a dd.


----------

