LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 02-11-2012, 12:30 AM   #1
nweissma
LQ Newbie
 
Registered: Oct 2007
Location: Brooklyn NYC [USA]
Posts: 13

Rep: Reputation: 0
How to repair GRUB


Both Solaris 11 and Windows, installed on the same hdd, x86_64.

Subsequent to the moving/resizing of the Windows Partition, by GParted, GRUB no longer appears at bootup; only Windows boots -- as though Solaris and GRUB don't even exist.

At first, Windows refused to boot also, but the Windows Install/Repair disk, coupled with "last known good configuration," dissolved that problem.

The Solaris Partition has not been disturbed afaik.

Can i save my Solaris 11 installation?
 
Old 02-11-2012, 01:22 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,507

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
You need to boot from a live media and reinstall grub stage1, which has been overwritten by windows, from the command line.

Code:
installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t0d0s0
Adjust the device name (c0t0d0s0) to the one used for your boot disk.
 
Old 02-12-2012, 01:09 AM   #3
nweissma
LQ Newbie
 
Registered: Oct 2007
Location: Brooklyn NYC [USA]
Posts: 13

Original Poster
Rep: Reputation: 0
Nope, Not Quite

Merci beaucoup, Jilliagre,

mais ce n'est pas correcte (est-ce que j'ai dit cela correctement?).

the rejection message reads:

Quote:
raw device must be a root slice (not s2)
unable to gather device information for /dev/rdsk/c3t0d0p0
two more questions, mon amie:

what is the nomenclature for these device names? thus, what does "c3t0d0p0" mean?

why do you say that Windows overwrote GRUB's stage1?

i tried to fix the problem by booting the GParted 0.11.0-10 Live CD
https://sourceforge.net/projects/gpa...ble/0.11.0-10/

i needed to adopt the role of su but the terminal would not allow it because i did not know the PASSWORD -- HOW THE HELL AM I SUPPOSED TO KNOW THIS GODDAMN PASSWORD, F'CHRISSAKE ?!!!!!

anyway, GParted concedes that this issue has been known for a long time, and that they think/hope that a solution/workaround can be had by "*** We recommend GParted Live 0.6.2-2 or higher for all partition editing operations. ***" ... i was using GParted 0.4.5

à bientôt

Last edited by nweissma; 02-12-2012 at 01:19 AM. Reason: ADDITION; AESTHETICS; FORGOT 2ND QUESTION
 
Old 02-12-2012, 03:17 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,507

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by nweissma View Post
mais ce n'est pas correcte (est-ce que j'ai dit cela correctement?).
Almost, I would have written "Mais c'est incorrect (l'ai-je écrit correctement ?)" By the way, LQ forum rules forbids non English postings so let's stick to it ...

Quote:
the rejection message reads:
raw device must be a root slice (not s2)
unable to gather device information for /dev/rdsk/c3t0d0p0
You fail to tell how you determined what your boot disk device was and the actual command you entered.
Quote:
what is the nomenclature for these device names? thus, what does "c3t0d0p0" mean?
c3: disk controller #3
t0: scsi or sata target #0
d0: disk #0
p0: partition #0 (i.e.: whole disk).
Quote:
why do you say that Windows overwrote GRUB's stage1?
Because that's the most probable explanation.
Quote:
i tried to fix the problem by booting the GParted 0.11.0-10 Live CD
https://sourceforge.net/projects/gpa...ble/0.11.0-10/
There is probably no way to reinstall Solaris grub stage one with a Linux based CD. Sorry if I wasn't clear enough. You need to boot from a Solaris bootable media to run the command I suggested.
However, it would help if you tell what gparted reports about your disk, like what partitions it founds and which one is active.
 
Old 02-12-2012, 04:55 PM   #5
nweissma
LQ Newbie
 
Registered: Oct 2007
Location: Brooklyn NYC [USA]
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jlliagre View Post
You fail to tell how you determined what your boot disk device was and the actual command you entered.
i can imagine how frustrating it is to try to communicate with a noob. to wit, i don't understand what you are asking here; do you mean "where did i find the alphanumeric 'c3t0p0d0'"? i obtained that information from the GParted (antiquated version 0.4.5) found on the latest solaris11 live dvd > information: d0 = entire disk; d1 = ntfs/windows partition; d2 = solaris partition; c4t0d0p1 = 14.96gb|fat32|flags=-boot, lba .. i have no idea as to the identity of this c4t0d0p1 14.96gb fat32.

i entered the command you gave me:
Code:
installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c3t0d0p0

Quote:
c3: disk controller #3
t0: scsi or sata target #0
d0: disk #0
p0: partition #0 (i.e.: whole disk).
Thanks for this rosetta stone!

Quote:
Because that's the most probable explanation.
you make it sound like windows was an active player -- GParted was the active player -- it resized and moved the windows partition; how can windows be accused of aggression?

Quote:
There is probably no way to reinstall Solaris grub stage one with a Linux based CD.
these peek-a-boo surprises are killing me! not even the GParted site noted this!! can you tell me specifically why the GParted live linux will fail with solaris -- i was led to believe that solaris incorporates the linux GParted? and the big question: if i can't use the latest GParted version, because it's linux, then where do i find this latest version in solaris?
Quote:
You need to boot from a Solaris bootable media to run the command I suggested.
again, we have this stuck-between-a-rock-and-a-hard place syndrome: the solaris live dvd only has the antiquated GParted version 0.4.5, the buggy version that caused the problem: http://gparted-forum.surf4.info/viewtopic.php?id=13777

Quote:
However, it would help if you tell what gparted reports about your disk, like what partitions it founds and which one is active.
i don't yet know how to create a file from a screenshot, one which can be uploaded to an image bank (such as photobucket), while in solaris live. how will you use this information?

Last edited by nweissma; 02-12-2012 at 05:09 PM. Reason: clarity; mistake;
 
Old 02-12-2012, 06:19 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,507

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by nweissma View Post
i can imagine how frustrating it is to try to communicate with a noob. to wit, i don't understand what you are asking here; do you mean "where did i find the alphanumeric 'c3t0p0d0'"? i obtained that information from the GParted (antiquated version 0.4.5) found on the latest solaris11 live dvd > information: d0 = entire disk; d1 = ntfs/windows partition; d2 = solaris partition; c4t0d0p1 = 14.96gb|fat32|flags=-boot, lba .. i have no idea as to the identity of this c4t0d0p1 14.96gb fat32.
Okay. It wasn't obvious from your posting you were initially using Solaris gparted. Can you tell more precisely what you did (beyond "moving/resizing windows partition") ?
Specifically, how was the disk partitioned before and after the incident ?
Quote:
i entered the command you gave me:
Code:
installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c3t0d0p0
You didn't actually. That should be:
Code:
installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c3t0d0s0
p0 is the whole disk while s0 is the first slice (equivalent to a logical partition) or the Solaris primary partition. This is where grub stage 2 should be installed.
Quote:
you make it sound like windows was an active player -- GParted was the active player -- it resized and moved the windows partition; how can windows be accused of aggression?
I assumed that from this statement of yours:
Quote:
At first, Windows refused to boot also, but the Windows Install/Repair disk, coupled with "last known good configuration," dissolved that problem.
This has certainly overwritten Solaris MBR to recover Windows. Of course, Windows is not accused of aggression here. "gparted" might be although it clearly states:
CAUTION: Editing partitions has the potential to cause LOSS of DATA.
You are advised to BACKUP your DATA before using gparted.
Quote:
these peek-a-boo surprises are killing me! not even the GParted site noted this!! can you tell me specifically whyincorporates the linux GParted?
You are misunderstanding me. I was stating you couldn't successfully run installgrub from a Linux distribution, I wasn't referring to the gparted application
Quote:
and the big question: if i can't use the latest GParted version, because it's linux, then where do i find this latest version in solaris? again, we have this stuck-between-a-rock-and-a-hard place syndrome: the solaris live dvd only has the antiquated GParted version 0.4.5, the buggy version that caused the problem: http://gparted-forum.surf4.info/viewtopic.php?id=13777
The bug described here is about interaction between gparted and versions of the Linux kernel, there is no evidence the Solaris kernel is affected (although of course a similar issue might exists with it).
Quote:
i don't yet know how to create a file from a screenshot, one which can be uploaded to an image bank (such as photobucket), while in solaris live. how will you use this information?
For being able to dual-boot Windows and Solaris, you need to make sure:
- Solaris grub is properly installed
- the Solaris primary partition is marked as active
- The Solaris installation (file system) is not corrupted.
 
Old 02-15-2012, 01:08 AM   #7
nweissma
LQ Newbie
 
Registered: Oct 2007
Location: Brooklyn NYC [USA]
Posts: 13

Original Poster
Rep: Reputation: 0
Apologies for not responding for 24 hours - i was out of town.


Quote:
Originally Posted by jlliagre View Post
Okay. It wasn't obvious from your posting you were initially using Solaris gparted. Can you tell more precisely what you did (beyond "moving/resizing windows partition")
i did nothing else to ntfs partition, or the solaris11 partition,or any other gremlin-created partition.
Quote:
Specifically, how was the disk partitioned before and after the incident ?
i don't how to answer this .. what type of information is this question asking for -- can you provide a formal example? and how would i find this information, other than by GParted's gui ?



Quote:
You are misunderstanding me. I was stating you couldn't successfully run installgrub from a Linux distribution, I wasn't referring to the gparted application
i'm not sure how to read this: GParted on a linux distro obviously cannot be used to install it on solaris .. can you explain what you are saying here?


Quote:
there is no evidence the Solaris kernel is affected
??? why is the fact that Solaris's Gparted 0.4.5 decimated GRUB, not adequate evidence ?


it thus appears to me that, even if i succeed in reinstalling GRUB from the Solaris Live DVD, i can never use the Solaris's buggy 0.4.5 GParted, because it will decimate GRUB again, as a matter of course. i will need to mention this bug/deficiency in Solaris's bug report mechanism, because when i tried to introduce the deficiency via the Solaris forums (Solaris developer's forum), i was instantly thrashed. so, what do you recommend that i use to effect Solaris partitioning operations ?

Last edited by nweissma; 02-15-2012 at 01:24 AM. Reason: mistake; forgot a thought
 
Old 02-15-2012, 08:51 AM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,507

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by nweissma View Post
i did nothing else to ntfs partition, or the solaris11 partition,or any other gremlin-created partition.
I'm not asking if you did something else but just that you explain more precisely what you did.
 
Old 02-15-2012, 03:32 PM   #9
nweissma
LQ Newbie
 
Registered: Oct 2007
Location: Brooklyn NYC [USA]
Posts: 13

Original Poster
Rep: Reputation: 0
i attempted only to increase the size of the ntfs/W7 partition. the Solaris-adapted GParted 0.4.5 interpreted this as a move(!), and after 30 minutes of churning, GParted effected, as far as i can tell, only the ntfs partition being moved a few MB to the left, and it ruined my W7 boot (GParted is so buggy that i will replace it asap -- enough is enough -- i'm 57 yo: there's just so much frustration i can take! i took it well when i was 14 -- it gave me exposure to the unexplored world -- but i'm no longer of that kiddie disposition). the W7 boot was repaired, quickly, with the W7 repair disk.

i will replace the Solaris11 Live DVD Solaris-adapted GParted 0.4.5 with another partitioning tool; then this total frustration will vanish ..
 
Old 02-16-2012, 12:43 AM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,507

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
What you describe seems unrelated to the gparted bug you posted a link to. As I already wrote, the bug report tells the issue is between gparted and the Linux kernel ("failure to inform kernel of partition changes") so is very likely to affect code which has been rewritten in the Solaris port. Moreover, it is reported to affect 0.4.8-1 through 0.5.2-9 while Solaris gparted is outside that range (0.4.5).

According to the information you posted the NTFS partition was the first one (p1) and the Solaris one the second one (p2). I'm missing how you expect to increase the size of the first partition given the fact there should be no free space at either sides of it.

To display the current partition layout, you can use either:

Code:
fdisk -l # on linux
or
Code:
fdisk -v -W - /dev/rdsk/c3t0d0p0 # on Solaris
 
Old 02-16-2012, 09:30 PM   #11
nweissma
LQ Newbie
 
Registered: Oct 2007
Location: Brooklyn NYC [USA]
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jlliagre View Post
Moreover, it is reported to affect 0.4.8-1 through 0.5.2-9 while Solaris gparted is outside that range (0.4.5)
you mention a good point. fact is, that Curtis Gedak, a GParted developer and forum moderator, directed me to this. in any event. i can tell you that although 0.4.5 is outside the range, the fact is that Solaris11-adapted GParted 0.4.5 produces the identical problem.

i bring your attention to these links; perhaps you can extract the necessary file information:


http://i244.photobucket.com/albums/g.../GParted_1.png

http://i244.photobucket.com/albums/g.../GParted_2.png

http://i244.photobucket.com/albums/g.../GParted_3.png


Quote:
According to the information you posted the NTFS partition was the first one (p1) and the Solaris one the second one (p2). I'm missing how you expect to increase the size of the first partition given the fact there should be no free space at either sides of it.
it's really very simple: i have no idea what you are talking about!! what is the purpose of the free space, how big does it have to be, do i create it or is its configuration out of my hands? i am deficient in the rudimentary concepts.

Quote:
Code:
fdisk -v -W - /dev/rdsk/c3t0d0p0 # on Solaris
i will try this after i get your response from the above links (.png's)


btw, am i correct in saying that the GParted 0.11.0-10 Live -- written for linux -- is of no use in the Solaris environment? i originally thought that some of 0.11.0-10's features -- such as terminal, or even "screenshot" -- might have function, but this appears not to be the case.

Last edited by nweissma; 02-16-2012 at 09:36 PM. Reason: forgot a question
 
Old 02-17-2012, 01:03 AM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,507

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by nweissma View Post
you mention a good point. fact is, that Curtis Gedak, a GParted developer and forum moderator, directed me to this. in any event. i can tell you that although 0.4.5 is outside the range, the fact is that Solaris11-adapted GParted 0.4.5 produces the identical problem.
Please refrain insisting both are identical problems while you admit having no idea about what either problems are.
Quote:
i bring your attention to these links; perhaps you can extract the necessary file information:

it's really very simple: i have no idea what you are talking about!! what is the purpose of the free space, how big does it have to be, do i create it or is its configuration out of my hands? i am deficient in the rudimentary concepts.
That is the root cause of the issue. You used a potentially destructive tool without any clue about its usage and purpose. Free space is reported as "Unallocated" by gparted. As you can see there is no unallocated space in the first screenshot. What would help understanding what you did would be to have a screenshot of this disk layout before you damaged it.
Quote:
btw, am i correct in saying that the GParted 0.11.0-10 Live -- written for linux -- is of no use in the Solaris environment?
No. gparted (the application) should be usable.
Quote:
i originally thought that some of 0.11.0-10's features -- such as terminal, or even "screenshot" -- might have function, but this appears not to be the case.
Terminal and screenshot are quite unrelated to gparted (the application). How you expect them to be related to Solaris is unclear.
 
  


Reply

Tags
grub, partitioning, resizing


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
grub repair kuddush Linux - Desktop 3 03-14-2011 01:30 PM
how to repair grub vineetdeepu Linux - Newbie 4 03-11-2010 08:17 AM
LXer: Super GRUB Disk--A GRUB Repair Utility LXer Syndicated Linux News 0 09-20-2008 10:20 PM
Repair grub? nyroc Linux - Newbie 1 01-09-2003 06:50 PM
Grub repair Snake007uk Linux - General 13 05-10-2002 07:14 AM


All times are GMT -5. The time now is 03:47 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