Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Installation & Upgrades
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Installation & Upgrades
For questions about upgrading and installation of your new Ubuntu OS.

 
Thread Tools Display Modes
Old April 24th, 2007   #1
dannyboy79
Ubuntu addict and loving it
 
dannyboy79's Avatar
 
Join Date: May 2006
Location: Milwaukee,WI
Beans: 4,179
Ubuntu 7.04 Feisty Fawn
Send a message via AIM to dannyboy79
SOLUTION TO /bin/sh: can't access tty; job control turned off

UPDATED FIX!!! I removed the old suggestion that I had written and pasted the new fix from the main thread of this problem...... Credit to this goes to
hbjason as these are his exact words. It appears as though it's a combination of some of my suggestions that I found on the internet etc etc.


f you are getting this error (and you have a SATA harddrive); this is the fix:

At the LiveCD initial boot screen:
o Select F6 for more options
o Add the following option to the beginning of the options list:
break=top
o Press enter to start booting
Ubuntu will start booting, but kick you out to a command prompt; at the prompt type these two commands:
modprobe piix
exit

You will now boot into the LiveCD normally.

If you choose to install from the LiveCD, you must make the following modifications (or else your installed system will not be able to boot, just like the LiveCD):
o Make note of the device id of the partitions that were used to install (such as /dev/hda1)
-- if you choose to install the '/boot' mount from a different partition make note of it as well (this would be done from the manual partition selection); just a side note -- if you do this, make sure the boot partition is at least 50MB or the install will error at grub setup
o When the install is complete do not reboot -- stay in the LiveCD
o Open a terminal (Applications->Accessories->Terminal)
o You must now mount the installed partitions by typing the following (assuming the install was to /dev/hda1; otherwise replace '/dev/hda1' with the install partition) commands:

mkdir target
sudo mount /dev/hda1 target

*if you also created a boot partition issue (replace /dev/hda2 with the boot partition) the command:
sudo mount /dev/hda2 target/boot

sudo chroot target

o You will now be in a 'chroot' command prompt for your new ubuntu system (be careful here, you are editing with root access!)
o You must edit the /etc/initramfs-tools/modules file; adding a line with the word: piix
-- you should do this with your favorite unix editor; or simply type the command:
echo piix >> /etc/initramfs-tools/modules
o After modifying the file you must update the system with the command
update-initramfs -u
o When complete, type 'exit' to exit the chroot env; you can now close the Terminal and reset your system.

Now when you boot you will be in your new shinny Ubuntu system!
__________________
Check out my Blog about my life and computer software and hardware. http://danielscomps.blogspot.com/

Last edited by dannyboy79; April 30th, 2007 at 09:44 AM..
dannyboy79 is offline   Reply With Quote
Old April 27th, 2007   #2
Ipsissimus
5 Cups of Ubuntu
 
Join Date: Dec 2005
Location: Florida, USA
Beans: 20
Ubuntu 8.10 Intrepid Ibex
Re: SOLUTION TO /bin/sh: can't access tty; job control turned off

My upgrade from Edgy to Feisty encountered several problems, but this one the most gruesome.

1. The update-manager upgrade stalled at the very end. I could not figure out why, and on reboot Feisty did not start.
2. The Feisty i386 install CD would not boot because I have an ATI card. So I had to manually mount and install xorg-driver-fglrx drivers.
3. Tried installing Feisty from the 'Alternate CD'. But that failed on some kind of hard drive driver issue.

My system was installed, but I had this same TTY error everyone had. And the above fix did NOT fix my system. This did:

Having searched/read countless feisty bugs I found this: boot on md raid drives fails

I booted from the 'Alternate CD' using the 'Recover Damaged System' option, mounted my hard drive (/dev/sda7) downloaded the initramfs-tools package: http://people.ubuntu.com/~scott/packages/initramfs-tools_0.85eubuntu10_all.deb

After installing this I rebooted, and Feisty worked! And it seems the upgrade did in fact install correctly. Seems that my settings/programs from Edgy are still in place. Still having an issue with WPA and my ipw3945 wireless card though.

If the above doesn't fix your system, perhaps this will.

-- Ipsissimus
Ipsissimus is offline   Reply With Quote
Old April 27th, 2007   #3
hal8000
Ubuntu Extra Shot
 
hal8000's Avatar
 
Join Date: Mar 2005
Location: UK
Beans: 385
Re: SOLUTION TO /bin/sh: can't access tty; job control turned off

Well done DannyBoy, after reading your post and Shevins blog and Ben Collins I managed to fix my Feisty install without unplugging any cables. I booted from the live feisty cd, change rooted into my Feisty root partition and appended piix to /etc/initramfs-tools/modules

(previously I have been booting Feisty with a 2.6.18 kernel so update-initramfs -u failed for me.)
However I simply created a new inintramfs and modified grub

cd /boot
mkinitramfs initramfs-2.6.20-15-generic

(Above lines created a new initramfs in /boot to match the feisty kernel, and I modified /boot/grub/menu.lst to point to the new initramfs)

To confirm:
uname -a
Linux orac 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux

lsmod | grep piix
ata_piix 15492 0
libata 125720 2 ata_piix,ata_generic
piix 10756 0 [permanent]


The piix module is now used.
I have a PATA (UDMA 100 HD on IDE0 as master and LS120 drive on IDE0 as slave. A cdwriter and dvdwriter on IDE1. Motherboard is Asus P4P800E , there is an onboard Promise SATA controller but mine is disabled in BIOS as I dont use SATA drives.


More Verbose instructions:

First install Feisty and make a note of your partitions, my Feisty / is /dev/hda11 and Feisty /home is /dev/hda12

Boot with the live Feisty 7.04 CD.
When at the desktop create a mountpoint for the Feisty / partition, I have called mine feistyroot

mkdir feistyroot

Now as root mount the Feisty / partition:

sudo mount /dev/sda11 feistyroot
(watch out as Feisty will now rename hda partitions as sda)


Now change root into the Feisty system
chroot feistyroot

Now modify /etc/initramfs-tools/modules

sudo echo piix >> /etc/initramfs-tools/modules

Create a new initramfs in /boot
(Make sure initramfs name refelects the Feisty kernel name)

cd /boot
mkinitramfs -o initramfs-2.6.20-15-generic


Final step, check your /boot/grub/menu.lst file and make sure you are booting
the new initramfs,

Extract from my grub menu.lst:
title Ubuntu Feisty
splash =(hd0,10)/boot/splash.tar.gz
kernel (hd0,10)/boot/vmlinuz-2.6.20-15-generic root=/dev/hda11 vga=791 ro splash
initrd (hd0,10)/boot/initrd.img-2.6.20-15-generic

Remember grub counts from 0 so hd0,10 is partition 11.
Hopefully this solution works for you also.

Last edited by hal8000; April 27th, 2007 at 04:32 PM..
hal8000 is offline   Reply With Quote
Old April 27th, 2007   #4
dannyboy79
Ubuntu addict and loving it
 
dannyboy79's Avatar
 
Join Date: May 2006
Location: Milwaukee,WI
Beans: 4,179
Ubuntu 7.04 Feisty Fawn
Send a message via AIM to dannyboy79
Re: SOLUTION TO /bin/sh: can't access tty; job control turned off

This is great news!!!! Hopefully newbies converting from other's os's will be able to follow and perform your above mentioned fix. So jjust to be clear for other newbies, can you maybe edit your post and be super duper specific as to how you created a new initramfs and possibly update any other instructions you wrote so that you make it totally newbie friendly. For example, does this fix work if you haven't installed feisty at all, can you chroot into the live cd to fix it before it get's put onto your hard drive? I guess I am not totally aware of what happens to people when you try to boot the livecd and they get dropped to this busybox prompt. I know that when I had an issue with my ATI card on my P4P800-E Deluxe, I couldn't for the life of me get Dapper LiveCD to boot, no matter what I would get dropped to busybox, so the solution was to add break=bottom to the boot line, then at the busybox prompt, I chrooted into the live cd (i thought?), changed the xorg.conf from ati to vesa, saved xorg.conf, and hit control d at the busybox prompt and it continued booting the livecd and it worked. (see this post for total story: http://ubuntuforums.org/showthread.php?t=386688
post #5)

I am glad to hear that it works for that specific hardware as I mentioned above I too own the P4P800-E Deluxe. That is the last box that I haven't converted from Win XP Pro that exists in my house. All other's are running some form of ubuntu. at least when I convert that box I'll know what to do unless of course ubuntu developers fix this issue in the next release. cough cough cough.

thanks for posting your additional solution but if you could do as I asked that would be so awesome!
__________________
Check out my Blog about my life and computer software and hardware. http://danielscomps.blogspot.com/
dannyboy79 is offline   Reply With Quote
Old April 27th, 2007   #5
hal8000
Ubuntu Extra Shot
 
hal8000's Avatar
 
Join Date: Mar 2005
Location: UK
Beans: 385
Re: SOLUTION TO /bin/sh: can't access tty; job control turned off

Quote:
Originally Posted by dannyboy79 View Post
thanks for posting your additional solution but if you could do as I asked that would be so awesome!

Ok, post edited to reflect changes, code I typed in blue for easier reading, remember that the credit is for the original threads, mine is a modification of ideas, Regards, Hal/
hal8000 is offline   Reply With Quote
Old April 27th, 2007   #6
dannyboy79
Ubuntu addict and loving it
 
dannyboy79's Avatar
 
Join Date: May 2006
Location: Milwaukee,WI
Beans: 4,179
Ubuntu 7.04 Feisty Fawn
Send a message via AIM to dannyboy79
Re: SOLUTION TO /bin/sh: can't access tty; job control turned off

Quote:
Originally Posted by hal8000 View Post
Ok, post edited to reflect changes, code I typed in blue for easier reading, remember that the credit is for the original threads, mine is a modification of ideas, Regards, Hal/
alright hal, you might have not read my question but I asked what do people do when they get the busybox prompt (initramfs) straight away, they don't even make it far enough to even install Feisty??? Can you fix it from the busybox prompt if you don't even have feisty installed yet??? can't you chroot into the livecd or the ramfs. Like I said, I don't know, I am merely trying to help out those people that can't even get to the stage that they installed feisty on their computers because most people have been getting busybox immediately before even getting the livecd to boot fully so that they can then chose hte instal option. thanks for more clarification if you could.
__________________
Check out my Blog about my life and computer software and hardware. http://danielscomps.blogspot.com/
dannyboy79 is offline   Reply With Quote
Old April 27th, 2007   #7
hal8000
Ubuntu Extra Shot
 
hal8000's Avatar
 
Join Date: Mar 2005
Location: UK
Beans: 385
Re: SOLUTION TO /bin/sh: can't access tty; job control turned off

Quote:
Originally Posted by dannyboy79 View Post
alright hal, you might have not read my question but I asked what do people do when they get the busybox prompt (initramfs) straight away, they don't even make it far enough to even install Feisty??? Can you fix it from the busybox prompt if you don't even have feisty installed yet??? can't you chroot into the livecd or the ramfs. Like I said, I don't know, I am merely trying to help out those people that can't even get to the stage that they installed feisty on their computers because most people have been getting busybox immediately before even getting the livecd to boot fully so that they can then chose hte instal option. thanks for more clarification if you could.

No, the solution will not work for everyone. In my case I could load the live cd, install Feisty, but on reboot it would halt with the cant access tty error.
To use chroot you must have a bootable system; either on a live cd or loaded on a partition. If the busybox prompt is displayed from a live cd then there is no way (that I can see) around this problem.....
having said that, it may be possible to install 6.10 Edgy first, then do apt-get distro upgrade to update to Feisty, but I think some people have had problems with this method of install.
hal8000 is offline   Reply With Quote
Old April 28th, 2007   #8
ifinishwhatistar
First Cup of Ubuntu
 
Join Date: Feb 2007
Beans: 12
Re: SOLUTION TO /bin/sh: can't access tty; job control turned off

Hi Hal

I had roughly the same problem as you. In my case, I upgraded from edgy to feisty from within the update-manager, but then found I couldn't reboot. I eventually figured out that I could boot into an older kernel (I'm currently running feisty on the 2.6.17-11 kernel) but just not the 2.6.20-15 one.

I tried what you said (added piix and remade the initramfs for 2.6.20-15), but I still have the same problem:
the computer hangs for about 3-5 minutes and then finally I get the tty error, that my root partition (/dev/mapper/nvidia_bfcfchfc4) doesn't exist.

From the shell that it drops me to, if I ls /dev/mapper, I CAN see nvidia_bfcfchfc, just not the four partitions that the controller should list (1 (windows), 2 (swap), 3 (boot), 4 (root)).

I think I can confirm that I did this properly because when I lsmod | grep piix from feisty (under 2.6.17-11), it says "piix 11780 0 "

Can you remember if there was anything else you did to get it recognize your root partition?

Otherwise I suppose that I somehow have a different problem...

BTW my hardware is as follows:
HDD: 2x120gb Maxtor SATA drives in RAID0 through NVIDIA raid controller through dmraid
MB: Gigabyte GA-8N-SLI rev 1.1 (nforce4 chipset)
CPU: Pentium D 940
RAM: 2gb ddr2
GeForce 7900GT
ifinishwhatistar is offline   Reply With Quote
Old April 28th, 2007   #9
hbjason
First Cup of Ubuntu
 
Join Date: Apr 2007
Beans: 2
Re: SOLUTION TO /bin/sh: can't access tty; job control turned off

Quote:
Originally Posted by hal8000 View Post

More Verbose instructions:

First install Feisty and make a note of your partitions, my Feisty / is /dev/hda11 and Feisty /home is /dev/hda12

Boot with the live Feisty 7.04 CD.
When at the desktop create a mountpoint for the Feisty / partition, I have called mine feistyroot

mkdir feistyroot

Now as root mount the Feisty / partition:

sudo mount /dev/sda11 feistyroot
(watch out as Feisty will now rename hda partitions as sda)


Now change root into the Feisty system
chroot feistyroot

Now modify /etc/initramfs-tools/modules

sudo echo piix >> /etc/initramfs-tools/modules

Create a new initramfs in /boot
(Make sure initramfs name refelects the Feisty kernel name)

cd /boot
mkinitramfs -o initramfs-2.6.20-15-generic


Final step, check your /boot/grub/menu.lst file and make sure you are booting
the new initramfs,

Extract from my grub menu.lst:
title Ubuntu Feisty
splash =(hd0,10)/boot/splash.tar.gz
kernel (hd0,10)/boot/vmlinuz-2.6.20-15-generic root=/dev/hda11 vga=791 ro splash
initrd (hd0,10)/boot/initrd.img-2.6.20-15-generic

Remember grub counts from 0 so hd0,10 is partition 11.
Hopefully this solution works for you also.
This is basically the same thing I did to get my install to work... just remember that you need to add the option break=top to the LiveCD boot options (using F6) and start booting, when you are kicked out of the boot and into a command prompt type:
modprobe piix
exit


You will then be booted into the LiveCD where you can run the install.

After the install open a terminal (Applications->Accessories->Terminal); in the terminal follow hal8000's instructions (above) after install (remember not to select continue using the LiveCD after install). If you attempt to reboot at this point you will not be able to boot the ubuntu system; if you do reboot, just boot back into the LiveCD and start where you left off (no need to reinstall).

Just to simplify a little, however, after the command (in the chroot env):
sudo echo piix >> /etc/initramfs-tools/modules
all I needed to do is issue the command
sudo update-initramfs -u
to update the initramfs (thus correcting the system) and then
exit
to leave the chroot env; you can now close the Terminal window and reboot from the LiveCD to your new install.
hbjason is offline   Reply With Quote
Old April 28th, 2007   #10
ifinishwhatistar
First Cup of Ubuntu
 
Join Date: Feb 2007
Beans: 12
Re: SOLUTION TO /bin/sh: can't access tty; job control turned off

Right...sorry I think I wasn't clear--my initial upgrade to feisty was successful (i.e. I can boot into Feisty) but only if I use the older kernel. I think that's the situation hal described as well?

update:

OK so I tried booting from the Feisty live CD to see if I couldn't isolate the problem. I installed dmraid from the liveCD, and tried listing the partitions.
Here's the problem. dmraid indeed finds the raid controller, and it shows /dev/mapper/nvidia_bfcfchfc, which is the control node, but doesn't show any of the partitions. BUT, if I run fdisk -l /dev/mapper/nvidia_bfcfchfc, I CAN see all of my partitions!

How is this possible?

In any case, if I do exactly the same thing from the Edgy live CD, all my partitions show up in /dev/mapper...
Did dmraid break since edgy ?

Last edited by ifinishwhatistar; April 28th, 2007 at 07:27 PM..
ifinishwhatistar is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:07 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry