the device is busy-Ubuntu 10.10 not booting up on start up dev/sda1 no such directory

Asked by Derrick Matthews

pretty much exactly what the summary says my Ubuntu isn't starting up some how the OS which is supposed to be sda1 is now sdb1 and my USB which I'm using now to run linux is sda1 if you need my terminal out put here it is

Disk /dev/sda: 2003 MB, 2003795968 bytes
255 heads, 63 sectors/track, 243 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: 0x00000000

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 244 1956736 b W95 FAT32
Partition 1 has different physical/logical endings:
     phys=(242, 254, 63) logical=(243, 155, 40)

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: 0x0008084f

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 19076 153219072 83 Linux
/dev/sdb2 19076 19458 3068929 5 Extended
/dev/sdb5 19076 19458 3068928 82 Linux swap / Solaris

Please help to fix this so Ubuntu boots up normally

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu mountall Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Usually in the fstab file it uses UUIDs which transcend the sda1 stuff and it won't matter what device name is used for the partitions. I suggest you use UUIDs in the fstab file in /etc on your internal partition and the issue should go

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#2

can you sort of walk me through doing this I am still quite a newb when it comes to ubuntu well linux period, is there a certain command in the terminal that I am supposed to type in to do this if so what are the commands

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Boot to live CD and use the places menu to mount the system partition, then run:

gksudo nautilus and open etc then make a backup copy of the fstab file (ideally in the same folder), then open it.In a terminal you can run:

sudo blkid

to get the UUIDs of the partitions present in the system. You may find UUIDs are already being used.

Revision history for this message
delance (olivier-delance) said :
#4

What is exact error message ? What did you before problem occurred ?

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#5

I tried to mount the system partition but got this result:An error occurred while performing operation on 157gb file system ( partition 1 of ata wdc wd1600bevt-22a23t0): the device is busy

details: a job is pending on /dev/sdb1

Revision history for this message
delance (olivier-delance) said :
#6

If device was busy, perhaps now file system is inconsistent. Could you boot on Ubuntu USB stick, choose "Try" instead of "Install", and run a fsck on partition e.g. command "fsck /dev/sda1" or via System->Administration->Gparted check partition.

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#7

ubuntu@ubuntu:~$ fsck /dev/sdb1
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
fsck.ext2: Permission denied while trying to open /dev/sdb1
You must have r/w access to the filesystem or be root

didn't do sda1 because somehow the usb stick that I'm using right now to run linux is reading that it is mounted on sda1

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#8

You need to run that as root:

sudo fsck /dev/sdb1

(Or with /dev/sda1, or whatever you want to scan/repair with fsck.)

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#9

@ Eliah Kagan how do I run that as root when running ubuntu through usb stick

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#10

Same way. Prefix the command with "sudo " (without the quotes, but with the space). The only difference you're likely to notice between the behavior of sudo on live and installed systems is that on live systems is doesn't ask you for your password (unless you're using a manually created user account on the live system), whereas on installed systems it does (unless you've reconfigured it).

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#11

okay it gave me this result:

fsck.ext4: Device or resource busy while trying to open /dev/sdb1
Filesystem mounted or opened exclusively by another program?

Revision history for this message
Ubfan (ubfan1) said :
#12

It might be possible to boot the hard disk by:
1) Hold down shift key when booting to force the grub screen to appear (for 10 sec).
2)Type e to edit the grub commands, and using the arrow keys move to the linux line and change the root=/dev/sdba1 to root=/dev/sdb1
3)Control X to boot (instructions are also on screen).
If boot is successful, immediately run:
sudo update-grub
to fix the wrong device by using the UUID instead.
Not sure about the busy error -- you didn't use logical volumns did you? I've seen that message when trying to mount a logical volumn as a normal one.

Revision history for this message
Ubfan (ubfan1) said :
#13

It might be possible to boot the hard disk by:
1) Hold down shift key when booting to force the grub screen to appear (for 10 sec).
2)Type e to edit the grub commands, and using the arrow keys move to the linux line and change the root=/dev/sdba1 to root=/dev/sdb1
3)Control X to boot (instructions are also on screen).
If boot is successful, immediately run:
sudo update-grub
to fix the wrong device by using the UUID instead.
Not sure about the busy error -- you didn't use logical volumns did you? I've seen that message when trying to mount a logical volumn as a normal one.

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#14

man it didn't work i tried to even just say forget it and just reinstall Ubuntu 10.10 through my USB stick but it couldn't because I guess I need for the file system to be mounted which it isn't

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#15

ubuntu@ubuntu:~$ sudo fsck -b 32768 /dev/sdb1
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
fsck.ext4: Device or resource busy while trying to open /dev/sdb1
Filesystem mounted or opened exclusively by another program?

okay if anybody knows how to fix this error I believe the problem should be fixed

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#16

Are you able to boot from the live CD, select Try Ubuntu, and get a usable desktop that way, with which to work further on this problem?

Revision history for this message
Jeruvy (jeruvy) said :
#17

You cannot fsck a mounted disk. As Eliah stated, boot to a livecd (or recovery mode) and try with the disk not mounted.

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#18

I not trying to sound rude or anything but like I stated above I've been booting and using ubuntu since the incident from a usb stick/ which is the only option you can do on a netbook, every post here has been me running ubuntu through the usb stick

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#19

any body know the solution to why it's saying the following

ubuntu@ubuntu:~$ sudo fsck -b 32768 /dev/sdb1
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
fsck.ext4: Device or resource busy while trying to open /dev/sdb1
Filesystem mounted or opened exclusively by another program?

okay if anybody knows how to fix this error I believe the problem should be fixed

sdb1 has the OS

I'm running Ubuntu 10.10 right now (and through this whole entire question/answer session) through the usb stick which is sda1

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#20

if you run:

mount

do you see sdb1 as mounted? If so then run:

sudo umount /dev/sdb1

to unmount it

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#21

sdb1 is not showing that it is mounted I ran the command any way though but it just said that it wasn't mounted,

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#22

http://ubuntuforums.org/showthread.php?p=10585556

this person had the same issue as me but wasn't clear on how exactly he fixed the situation, he said he tried the commands on another linux distro but doesn't know which command did the trick to fix the issue and get Ubuntu 10.10 booting up and working like it is supposed to, I used my friends laptop to download and install Mint 10 on a usb are the commands the same if not if I boot up mint through the live usb can somebody walk me through the commands that did the trick for the guy that had the same issue inside of the link.

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#23

ignore that link i posted the wrong one even though that user is having the same issue as me

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#24
Revision history for this message
Eliah Kagan (degeneracypressure) said :
#25

> I not trying to sound rude or anything but like I stated
> above I've been booting and using ubuntu since the
> incident from a usb stick/ which is the only option you
> can do on a netbook, every post here has been me
> running ubuntu through the usb stick

No offense taken. However, unless I am misreading, you did not actually say that the system you were using was a live USB system. You said "my USB which I'm using now to run linux is sda1", which, since this sort of error is rare on a live system, I had taken to mean that you were running an Ubuntu system that had been *installed* on a hard drive that connected to your computer via USB.

Fortunately, as your research has revealed, this is a problem that's been seen and solved on live systems before. A number of solutions were proposed at http://ubuntuforums.org/showthread.php?s=0322b726bb449819493c98a0be7b3bbc&t=1658602&page=2, but the one that actually succeeded was to use a different (i.e., non-Ubuntu) Linux-based live CD to run fsck on the partition. (Perhaps this is related to some unknown bug in Ubuntu, which is not present in some other Linux-based systems.)

If you want to keep working with the Ubuntu live CD, then the next step is to try to find out what is accessing and locking that partition. To do that, you could run:

lsof /dev/sdb1; echo; fuser /dev/sdb1

If you do that, please post all the text from the Terminal here.

However, if you want to try another distribution (for repairing /dev/sdb1 with fsck -- after it's repaired, you should still be able to use/install Ubuntu on your computer after fixing it, if you wish), the distribution successfully used by the original poster in http://ubuntuforums.org/showthread.php?s=0322b726bb449819493c98a0be7b3bbc&t=1658602&page=2 to fix his partition was Slax (the specific post detailing this is at http://ubuntuforums.org/showpost.php?p=10318318&postcount=19).

Slax is a small live system based on Slackware, and it is available here: http://www.slax.org/

Revision history for this message
Derrick Matthews (drrckmtthws) said :
#26

yeah my mistake I was getting mix up inbetween different threads my bad,

here are the results from the terminal:

ubuntu@ubuntu:~$ lsof /dev/sdb1; echo; fuser /dev/sdb1
lsof: WARNING: can't stat() tmpfs file system /cow
      Output information may be incomplete.

Cannot stat file /proc/3987/fd/39: Stale NFS file handle

and just to be clear about the issue the live usb is just find I was running the live usb to find out why the ubuntu that I had installed and had been using for 2 months now wasn't booting up, a problem that happen after shutting the cp down one night and booting up my external hardrive still connected, I pulled it out before the cp could boot but got an error and ubuntu couldn't boot up normal after that so I used the live usb to try to sort out the issue,

I'm about to try to sort the issue out with mint since I've already installed it to my other flash drive and if that don't work out I'll go head and try slax

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#27

A search for that lsof warning message brings up http://ubuntuforums.org/showthread.php?t=1674709, which describes your situation pretty well and links to http://ubuntuforums.org/showthread.php?t=1601810 saying that thread provides a solution. That thread also seems to describe your situation pretty well, and it provides a number of different things you might to to fix your problem, but it mostly comes down to using a different live CD, specifically Slax. One person found Slax not to work, but Parted Magic did work.

There's no harm in trying Mint first, though since it is a very close derivative of Ubuntu, I doubt it will work any better for this.

By the way, I'm linking this question to bug 668561. Would you mind checking there to see if the description describes your problem? If it does, you can mark the bug as affecting you and, if you like, subscribe to it. If that bug really doesn't describe your problem, please feel free to remove the bug link in this question.

Can you help with this problem?

Provide an answer of your own, or ask Derrick Matthews for more information if necessary.

To post a message you must log in.