/bin/sh: can't access tty

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

/bin/sh: can't access tty

Postby cakehead on Sat Mar 31, 2007 7:09 pm

I just got this messeage on boot up ' /bin/sh: can't access tty; job contol turned off (initramfs) ' how do I sort this out please ?
User avatar
cakehead
Level 2
Level 2
 
Posts: 80
Joined: Sat Dec 30, 2006 4:24 pm
Location: Aberdeen, Scotland

Linux Mint is funded by ads and donations.
 

/bin/sh: can't access tty

Postby nick on Sun Apr 01, 2007 5:55 am

Hi
Looks like Edgy Bug
https://launchpad.net/ubuntu/+source/li ... +bug/74287
Are you trying to use ext2 partion?

Nick
nick
Level 5
Level 5
 
Posts: 686
Joined: Sat Dec 02, 2006 8:04 am

Postby cakehead on Mon Apr 02, 2007 10:37 am

no I am using ext 3 I think the problem is in grub. I need to reinstall grub but I don't know how to do it. I don't want to format the machine as I have files I want to keep.
User avatar
cakehead
Level 2
Level 2
 
Posts: 80
Joined: Sat Dec 30, 2006 4:24 pm
Location: Aberdeen, Scotland

Postby nick on Mon Apr 02, 2007 10:51 am

Hi
Anygood?
How to restore Grub from a live Ubuntu cd.
This will restore grub if you already had grub installed but lost it to a windows install or some other occurence that erased/changed your MBR so that grub no longer appears at start up or it returns an error.

(This how to is written for Ubuntu but should work on other systems. The only thing to take note of, when you see "sudo" that will mean to you that
the following command should be entered at a root terminal.)

Boot into the live Ubuntu cd. This can be the live installer cd or the older live session Ubuntu cds.

When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)


Code:
sudo grub
This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands


Code:
find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)


Code:
root (hd?,?)
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)

Next enter the command to install grub to the mbr


Code:
setup (hd0)
Finally exit the grub shell

Code:
quit
That is it. Grub will be installed to the mbr.
When you reboot, you will have the grub menu at startup.

Now the explanation.
Sudo grub gets you the grub shell.
Find /boot/grub/stage1 has grub locate the file stage1. What this does is tell us where grub's files are. Only a small part of grub is located on the mbr, the rest of grub is in your boot folder. Grub needs those files to run the setup. So you find the files and then you tell grub where to locate the files it will need for setup.
So root (hd?,?) tells grub it's files are on that partition.
Finally setup (hd0) tells grub to setup on hd0. When you give grub the parameter hd0 with no following value for a partition, grub will use the mbr. hd0 is the grub label for the first drive's mbr.
Quit will exit you from the grub shell.



THIS IS AN EDIT. 5-HT MADE A GOOD POINT AND I AM JUST GOING TO COPY/PASTE IT HERE


Quote:
Just have recommendation to add that may be irrelevant: it might be of benefit to give an explicit warning (though it is mentioned) that this guide will write GRUB to the MBR (just in case someone is using a different boot loader on their MBR and would like to reinstall GRUB to a partition).

If someone wants GRUB on a partition, the 'setup (hd0)' step can be modified to 'setup (hdX,Y)'. Where X is the hard disk, and Y the partition using GRUB's nomenclature of starting from 0 (first partition=0, second=1,...).

http://www.ubuntuforums.org/showthread.php?t=224351

Please read all the link as there are a couple of warnings
Nick
nick
Level 5
Level 5
 
Posts: 686
Joined: Sat Dec 02, 2006 8:04 am

Postby cakehead on Mon Apr 02, 2007 5:06 pm

Problem solved ! I have re-installed Mint, thanks for everyone's help
User avatar
cakehead
Level 2
Level 2
 
Posts: 80
Joined: Sat Dec 30, 2006 4:24 pm
Location: Aberdeen, Scotland


Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 14 guests