LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 02-21-2011, 10:49 AM   #16
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux
Posts: 1,012

Rep: Reputation: 93

If you have a rescue or live-CD, boot up from CD, log in as root user (or sudo), open a terminal and try the following:

Code:
sudo grub
find /boot/grub/stage1
root (hdX,Y)
setup (hd0)
quit
The line "root (hdX,Y)" would be the drive with grub on it, which would be listed while running the above commands. Likely it would be (hd0,0) or (hd0,1) -- try (hd0,0) first. It may be something else, given that your fdisk printout listed "sda1" and "sdb1". Try whatever it shows you after the "find" command (note, the find command may be "find /grub/stage1" rather than "find /boot/grub/stage1"). Hard drives typically are "hd" and floppies "fd", whereas usb drives often are "sd", but it seems a lot of people get their hard-drives labelled as "sd" for some reason.

If the live-CD allows you to log in as root, then the first line "sudo grub" would simply be "grub".

Note, I'm assuming from your question above that you can't boot in, and get an error from grub instead (IE, "grub 1.5 error 21", or something like that). If you can boot in to the one OS that has grub, but can't boot into the other OS you have -- W2K -- then that's a different matter. In that case, you may be able to edit the menu.lst file, or simply run update-grub or os-prober. Lemme know which is the case.

Last edited by mark_alfred; 02-21-2011 at 11:15 AM. Reason: I figured I may have misinterpreted the question.
 
Old 02-21-2011, 11:18 AM   #17
ulfscha
LQ Newbie
 
Registered: Feb 2011
Location: dc area
Distribution: ubuntu 11/10
Posts: 29

Original Poster
Rep: Reputation: 0
Much obliged CRTS!

I am 100% intent on using Ubuntu as my main future Tool. The support I experienced alone sufficed for a permanent conversion.
Its just that I have many important and sentimental files on WK2 and on the Ubuntu 10.10 disks.

The original W2K oem instal disk had let me down completely. " it could not even 'see' the 2 WD drives" that the Ubuntu disk utility had shown in all their glory!

I am presently restoring from a .tip archive via Acronis and found out during a 7 hour projected task to restore that I had Ubuntu 8 on the same back-up file!!!!


I shall attempt your screenshots etc method afterwards. I have also downloaded LTS 10.4.2 for this purpose already.

You all have been very helpful but I do not yet dare to push the 'solved' button for fear of losing the thread. My brain tells me it is solved though.
Meanwhile the Acronis restorer has changed his estimate down from 7 hours to 1 hr 47 minutes!

ps I had my grandson -who sees like a hawk- test the difference between 'l' and '1' and had him stymied until I pushed him for more vigilance! It made my day! Thanks!
 
Old 02-21-2011, 11:25 AM   #18
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by mark_alfred View Post
If you have a rescue or live-CD, boot up from CD, log in as root user (or sudo), open a terminal and try the following:

Code:
sudo grub
find /boot/grub/stage1
root (hdX,Y)
setup (hd0)
quit
The line "root (hdX,Y)" would be the drive with grub on it, which would be listed while running the above commands. Likely it would be (hd0,0) or (hd0,1) -- try (hd0,0) first. It may be something else, given that your fdisk printout listed "sda1" and "sdb1". Try whatever it shows you after the "find" command (note, the find command may be "find /grub/stage1" rather than "find /boot/grub/stage1"). Hard drives typically are "hd" and floppies "fd", whereas usb drives often are "sd", but it seems a lot of people get their hard-drives labelled as "sd" for some reason.

If the live-CD allows you to log in as root, then the first line "sudo grub" would simply be "grub".

Note, I'm assuming from your question above that you can't boot in, and get an error from grub instead (IE, "grub 1.5 error 21", or something like that). If you can boot in to the one OS that has grub, but can't boot into the other OS you have -- W2K -- then that's a different matter. In that case, you may be able to edit the menu.lst file, or simply run update-grub or os-prober. Lemme know which is the case.
Hi,

those instructions are valid for GRUB-Legacy. However, the OP uses Ubuntu 10.10 and therefore GRUB2. The device names, e.g., are a bit different. Also, there is no menu.lst.
 
1 members found this post helpful.
Old 02-21-2011, 12:54 PM   #19
EDDY1
Senior Member
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,658

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Actually if the Ubuntu installation was a failure and Op is going to continue using Ubuntu
Reinstall it.
Just make sure you don't erase and write to the windows partition.
 
Old 02-22-2011, 12:55 PM   #20
ulfscha
LQ Newbie
 
Registered: Feb 2011
Location: dc area
Distribution: ubuntu 11/10
Posts: 29

Original Poster
Rep: Reputation: 0
Hi CRTS!

sudo palimpsest does not work on my live disk unfortunately. The screenshots utility
had worked beautifully on my original main 10.10 Ubuntu, the object of my main recovery attempts.

According to ACRONIS I had restored W@K successfully after some 7 hrs, including the MBR yet it did not get beyond GRUB 1.2 error 2

Then I very carefully I installed U LT 10.10 on a free ext 4 on disk B space. it reported success;
though the option to load a grub -to which I had become familiar in earlier versions- never came up!
Upon restart attempt without a live cd it got into an endless loop after : " load from ATAPI cd "

I remounted the live cd and got results below where the boot is shown on the stick 4
GB that I use for file transfer as my sole available tool from the comatose drives.



WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk

/dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 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: 0xcbb6418d

Device Boot Start End Blocks Id System
/dev/sda1 1 14594 117220823+ ee GPT

Disk

/dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 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: 0x00030ecb

Device Boot Start End Blocks Id System
/dev/sdb1 1 18663 149903360 83 Linux
/dev/sdb2 18663 19458 6384641 5 Extended
/dev/sdb5 18663 19458 6384640 82 Linux swap / Solaris

Disk


/dev/sdc: 4043 MB, 4043309056 bytes
255 heads, 63 sectors/track, 491 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: 0x000a7574

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 492 3948512+ b W95 FAT32
Partition 1 has different physical/logical endings:
phys=(490, 254, 63) logical=(491, 145, 38)
ubuntu@ubuntu:~$


Should I give up postmaturely?
In my earlier live I was known as a beta tester who could make mistakes nobody else ever anticipated.
 
Old 02-22-2011, 05:26 PM   #21
EDDY1
Senior Member
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,658

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Will your linux install boot without live-cd?
Can you mount sda and view files.

Last edited by EDDY1; 02-22-2011 at 05:29 PM.
 
Old 02-22-2011, 07:27 PM   #22
ulfscha
LQ Newbie
 
Registered: Feb 2011
Location: dc area
Distribution: ubuntu 11/10
Posts: 29

Original Poster
Rep: Reputation: 0
To Eddy!

I can see and read some files of my old -wanted- ubuntu 10.10. I cannot open root as it does not let me be sudo;

the actual grub env??? is all ###########################################

When I tried to mount sdc1 that I see under fdisk -l I get "there is no such file or dir.

Since I also got the message that my disk 1 was of a format that is not supported
I am reinstalling W2K from a tib file via Acronis; this time in FAT format that is supported in the linux disk utility
Interestingly this is much faster 1 hour vs 7 that I sweated yesterday.

If I succeed this time with windows I can install wibu.exe which is claimed to
let me boot many parallel OSs.

Perhaps this might also be a lifeline: As advised by one of my guiding helpers:

#!/bin/bash
VERSION=0.55
DATE="February 15th, 2010"
#to use this script:
#
# sudo bash boot_info_script055.sh
#or
# su -
# bash boot_info_script055.sh
#
#
### last-modified
#
#author Ulrich Meierfrankenfeld (aka meierfra.)
# with contributions from caljohnsmith
# (both members of ubuntuforums.org)
# and Gert Hulselmans
#
#hosted at: http://sourceforge.net/projects/bootinfoscript/
#
#The birth of the boot info script:
# http://ubuntuforums.org/showthread.php?t=837791
#
#Looks at all MBRs and identifies the boot loader.
# For Grub and Supergrub: displays the controlling partition.
# If the MBR is unknown, displays the whole MBR.
#Looks at all partitions:
# Determines their type
# Identifies their boot sectors.
# For grub: displays the controlling partition and the offset
# of the stage2 file as recorded in the boot sector.
 
Old 02-22-2011, 07:47 PM   #23
EDDY1
Senior Member
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,658

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
sdc is your usb drive that you're using.
You need to take your time and read this link.
sdb is the drive that you want to boot into as it has the linux os that you want to install grub to.
mount sdb1, the way the link tells you to do it.
http://karuppuswamy.com/wordpress/20...rescue-prompt/
 
Old 02-23-2011, 05:41 AM   #24
ulfscha
LQ Newbie
 
Registered: Feb 2011
Location: dc area
Distribution: ubuntu 11/10
Posts: 29

Original Poster
Rep: Reputation: 0
"Posted by: EDDY1
On: 02-22-2011 08:47 PM

sdc is your usb drive that you're using.
You need to take your time and read this link.
sdb is the drive that you want to boot into as it has the linux os that you want to install grub to.
mount sdb1, the way the link tells you to do it.
http://karuppuswamy.com/wordpress/2010/06/02/how-to-chroot-to-ubuntu-using-live-cd-to-fix-grub-rescue-prompt/"

Many thanks! Will follow exactly.

Ps This post I only got through the extremely useful daily e-mail update/remainder. It did not come through on this page or is hidden?
 
Old 02-23-2011, 11:40 AM   #25
ulfscha
LQ Newbie
 
Registered: Feb 2011
Location: dc area
Distribution: ubuntu 11/10
Posts: 29

Original Poster
Rep: Reputation: 0
Eddy1!

/media/eecb4cab-5220-464e-80ba-8342085e7315 complete mountpath as per


karrupuswamy.com

The saga:



/$ sudo fdisk -l

Disk


Windows disk: The cause of all evil

/dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 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: 0xea08a326

Device Boot Start

End Blocks Id System
/dev/sda1 * 1 7297 58613121 7

The stick:

HPFS/NTFS

Disk /dev/sdb: 4043 MB, 4043309056 bytes
255 heads, 63 sectors/track, 491 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: 0x000a7574

Device Boot Start

End Blocks Id System
/dev/sdb1 * 1 492 3948512+ b W95 FAT32
Partition

1 has different physical/logical endings:
phys=(490, 254, 63) logical=(491, 145, 38)

Disk /dev/sdc:

Desired Linux Disk:


160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 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: 0x00030ecb

Device Boot Start End Blocks Id

System

/dev/sdc1 1 18663 149903360 83 Linux
/dev/sdc2 18663 19458

6384641 5 Extended
/dev/sdc5 18663 19458 6384640 82 Linux swap / Solaris
ubuntu@ubuntu:/
/$ sudo mount


/$ sudo mount /dev/sdc1 /mnt/media/eecb4cab-5220-464e-80ba-8342085e7315
mount: mount point

/mnt/media/eecb4cab-5220-464e-80ba-8342085e7315 does not exist


/$ sudo mount /dev/sda1 /mnt/media/eecb4cab-5220-464e-80ba-8342085e7315
Mount is denied because the

NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may

use it which
could be identified for example by the help of the 'fuser' command.
ubuntu@ubuntu:/$


It does not let me mount it ON ANY DISK a,b, or c

MY LINUX THAT I SEEK TO START
IS ON THE c 160 GB disk which gave me the path under control L:
media/ eeee...

( At one point it added 'files' in front of /media... which mount did not take either!



Thus I cannot perform
step 5
of this very clear procedure you kindly suggested!

Could it be that the different spacings before the / is
my error or is due to my old keyboard?


I also get a message "cannot unmount the NTFs drive because device is busy"
Could a virus exercising it?

Should I physically disconnect the Windows2k drive? (120 GB)
 
Old 02-25-2011, 09:24 AM   #26
ulfscha
LQ Newbie
 
Registered: Feb 2011
Location: dc area
Distribution: ubuntu 11/10
Posts: 29

Original Poster
Rep: Reputation: 0
Following your very helpful instructions I could boot my old w 2k and a new ubuntu10.4 LT.

I can even read all but the root and lost-and-found files on my yet not bootable old ubuntu 10.10


Many thanks to all my helpers!
 
Old 02-25-2011, 10:34 AM   #27
EDDY1
Senior Member
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,658

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Now that you're able to boot wins2k and ubuntu 10.04 you should be able to open terminal in ubuntu and issue command
"os-prober" then "update-grub".
 
1 members found this post helpful.
Old 02-25-2011, 02:56 PM   #28
ulfscha
LQ Newbie
 
Registered: Feb 2011
Location: dc area
Distribution: ubuntu 11/10
Posts: 29

Original Poster
Rep: Reputation: 0
Many thanks!

I think it works as I got no blue screen or many lines message back.

It was a real privilege to get that much help and ubuntu exposure

ulfscha

ulflt@ulflt-desktop:~$ cd /
ulflt@ulflt-desktop:/$ os-prober
unshare failed: Operation not permitted
rm: cannot remove `/var/lib/os-prober/labels': Permission denied
ulflt@ulflt-desktop:/$ sudo os-prober
[sudo] password for ulflt:
/dev/sda1:Microsoft Windows 2000 Professional:Windows:chain
/dev/sdb1:Ubuntu 10.10 (10.10):Ubuntu:linux
ulflt@ulflt-desktop:/$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-22-generic
Found initrd image: /boot/initrd.img-2.6.35-22-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows 2000 Professional on /dev/sda1
Found Ubuntu 10.10 (10.10) on /dev/sdb1
done
ulflt@ulflt-desktop:/$
 
  


Reply

Tags
grub


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
greetings and appreciation micah.prange LinuxQuestions.org Member Intro 1 08-03-2010 12:05 PM
Appreciation for Slackware 10 Disc 2 insyte Slackware 2 08-11-2004 02:18 PM
appreciation for microsoft mimithebrain General 43 06-25-2004 11:00 AM
Appreciation to All the admirable contributors Egyptian_Isis Linux - Newbie 1 11-01-2003 02:08 AM
appreciation tincat2 Linux - Security 1 07-29-2003 07:45 PM


All times are GMT -5. The time now is 05:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration