You are not logged in.

#1 2013-09-16 19:37:50

Synek
Member
Registered: 2013-03-24
Posts: 17

Cannot unmount /mnt after installation & system hangs on shutdown.

Once I exit chroot and run 'umount /mnt' as per the beginner's guide, I get the message:

umount: /mnt: target is busy.
              (In some cases useful info about processes that use
               the device is found by lsof(8) or fuser(1))

I am fairly new to Arch and Linux in general. I've installed Arch in 2 other machines with no such problem.

-------------------------------------------------------

The root of this whole issue is that my laptop hangs when I shutdown. It hangs on either one of these lines:

kvm: exiting hardware virtualization

or

sd 0:0:0:0: [sda] Synchronizing SCSI cache

I can't find anything by googling so I am pretty much clueless. I thought the issue stemmed from my not unmounting /mnt properly after the installation.

Last edited by Synek (2013-09-17 00:11:37)

Offline

#2 2013-09-16 19:47:02

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

First, did you try running lsof ?

You could also run mount to make sure you didn't forget to unmount something, and check you aren't in /mnt in another tty.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2013-09-16 19:51:58

BUR
Member
Registered: 2013-09-14
Posts: 9

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

Didn't you create separate home and boot partitions? Didn't you mount them? Shouldn't you unmount them first?

Last edited by BUR (2013-09-16 19:52:32)


■ ■ ■ ■ ■ ■ ■ ■ ■ ■

Offline

#4 2013-09-16 20:05:12

Synek
Member
Registered: 2013-03-24
Posts: 17

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

alphaniner wrote:

First, did you try running lsof ?

You could also run mount to make sure you didn't forget to unmount something, and check you aren't in /mnt in another tty.

When I run lsof I get "lsof will not execute and completion _lsof exists", then zsh asks me to correct 'lsof' to '_lsof'. When I press 'y', I get "_arguments:comparguments:312: can only be called from completion function".

I ran mount already and there's a lot of things still mounted, but I assumed it wasn't an issue since there was no mention of it in the beginner's installation guide. It's mostly things mounted on /sys, /run, /proc, and /dev. The two mounted on /mnt (after having run 'umount /mnt/{boot,home,}') are /dev/sda3 (my /home) on /mnt, and udev on /mnt/dev.

BUR wrote:

Didn't you create separate home and boot partitions? Didn't you mount them? Shouldn't you unmount them first?

I first ran 'umount /mnt' as per the beginner's guide on the wiki. Then I ran 'umount /mnt/{boot,home,}', and those two unmounted normally. I still get the /mnt error, though.

This is my third installation attempt. After the other two attempts, the system would hang when shutting down, on the line 'kvm: exiting hardware virtualization'. Everything worked fine other than that, but I reinstalled in the hopes of fixing it.

edit: sorry, I didn't create a specific boot partition. Just /, swap, and /home. Is that an issue?

Last edited by Synek (2013-09-16 20:08:35)

Offline

#5 2013-09-16 20:11:29

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

Synek wrote:

The two mounted on /mnt (after having run 'umount /mnt/{boot,home,}') are /dev/sda3 (my /home) on /mnt, and udev on /mnt/dev.

I'm not sure why your /home is mounted at /mnt (that's where your root partition should have been mounted, with your /home then mounted at /mnt/home), but you should not have anything left on /mnt at the end of the installation. The Beginners' Guide tells you to run this command:

umount -R /mnt

This should unmount everything on /mnt.

You can't run lsof because you don't have it installed.

https://wiki.archlinux.org/index.php/Be … and_reboot

Last edited by 2ManyDogs (2013-09-16 20:16:58)

Offline

#6 2013-09-16 20:12:17

BUR
Member
Registered: 2013-09-14
Posts: 9

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

Does it keep giving you errors if you try to unmount everything by using /dev/sda* instead of mountpoints? Start from the end (root partition should be touched only after everything else).


■ ■ ■ ■ ■ ■ ■ ■ ■ ■

Offline

#7 2013-09-16 20:18:13

Synek
Member
Registered: 2013-03-24
Posts: 17

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

2ManyDogs wrote:
Synek wrote:

The two mounted on /mnt (after having run 'umount /mnt/{boot,home,}') are /dev/sda3 (my /home) on /mnt, and udev on /mnt/dev.

I'm not sure why your /home is mounted at /mnt (that's where your root partition should have been mounted, with your /home then mounted at /mnt/home), but you should not have anything left on /mnt at the end of the installation. The Beginners' Guide tells you to run this command:

umount -R /mnt

This should unmount everthing on /mnt.

I did mount /home at /mnt/home, my mistake.

Running

umount -R /mnt

gives the same result as in the OP.

BUR wrote:

Does it keep giving you errors if you try to unmount everything by using /dev/sda* instead of mountpoints? Start from the end (root partition should be touched only after everything else).

Do you mean

umount /dev/sdxy

?

I ran

umount /dev/sdb3

(this is /home) and it is not mounted. I ran

umount /dev/sda3

(this is /) and I get the same error.

According to

mount

, /dev/sda3 is still mounted on /mnt and udev is still mounted on /mnt/dev. That's the only things still mounted on /mnt.

Offline

#8 2013-09-16 21:43:28

Synek
Member
Registered: 2013-03-24
Posts: 17

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

I ran:

lsof | grep /mnt

And I got nothing.

Does that mean that there's no process running in /mnt? Why is it 'busy', then?

edit: so I did

umount -l /mnt

and it unmounted (apparently). I tried rebooting and it's hanging on:

[10134.184262] sd 0:0:0:0: [sda] Synchronizing SCSI cache

Last edited by Synek (2013-09-16 21:47:38)

Offline

#9 2013-09-16 22:21:17

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

Could you clarify your partition layout? Earlier you said sda3 was home but now you say sdb3 is home and sda3 is the root partition.

What does gdisk -l /dev/sdX for each sdX give you? If you are using an MBR partition table, use fdisk rather than gdisk.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#10 2013-09-16 22:49:12

oliver
Member
Registered: 2007-12-12
Posts: 448

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

Synek wrote:

I ran:

lsof | grep /mnt

And I got nothing.

Try fuser

$ fuser /mnt

If there is any output, you will have to kill the PID (which will be given)... and it might be your own root shell if you su'd from within /mnt

Offline

#11 2013-09-16 23:36:18

Synek
Member
Registered: 2013-03-24
Posts: 17

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

cfr wrote:

Could you clarify your partition layout? Earlier you said sda3 was home but now you say sdb3 is home and sda3 is the root partition.

What does gdisk -l /dev/sdX for each sdX give you? If you are using an MBR partition table, use fdisk rather than gdisk.

Sorry, I keep making mistakes.

sda3 is /, sdb3 is /home.

I can't paste the output right now - I don't even have X installed and I don't know how to copy an output straight from the CLI; it's late so I am about to go to bed -, but it looks normal to me (root and home are both 'Linux' system with id 83, while swap has id 82 as expected). What are you looking for in the output? When I run it on /dev/sdb it returns "Partition 3 does not start on physical sector boundary" at the bottom. Partition 3 being my sdb3 (/home) presumably.

edit: I tried rebooting after doing 'umount -l /mnt', so I can't try fixing the /mnt problem now. The root of this whole issue is that my laptop hangs when I shutdown. It hangs on either one of these lines:

kvm: exiting hardware virtualization

or

sd 0:0:0:0: [sda] Synchronizing SCSI cache

I can't find anything by googling so I am pretty much clueless. I thought the issue stemmed from my not unmounting /mnt properly after the installation.

Last edited by Synek (2013-09-16 23:42:02)

Offline

#12 2013-09-16 23:37:26

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

Install something like wgetpaste so you can paste to a pastebin from the CLI. (No need for X.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#13 2013-09-16 23:45:52

Synek
Member
Registered: 2013-03-24
Posts: 17

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

http://www.bpaste.net/show/133024/

http://www.bpaste.net/show/133025

edit: what log file should I paste to show what happens when I shutdown? I think that this is the crux of the problem.

Last edited by Synek (2013-09-16 23:48:12)

Offline

#14 2013-09-17 00:16:33

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

Very odd that the partition is not aligned - most tools just do that automatically. What did you use to partition the disk?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#15 2013-09-17 00:26:00

Synek
Member
Registered: 2013-03-24
Posts: 17

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

cfr wrote:

Very odd that the partition is not aligned - most tools just do that automatically. What did you use to partition the disk?

cfdisk

Do you think that this the cause of the problem?

Last edited by Synek (2013-09-17 00:27:05)

Offline

#16 2013-09-17 00:29:35

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

I can't see why it would cause this problem, no. It does seem odd though. On the other hand, I've never used cfdisk - maybe it doesn't do that stuff automatically. mis-aligned partitions can cause performance issues, but I wouldn't think they'd have anything to do with stopping shutdown. As far as I know, they just slow stuff down and maybe increase wear on some hardware.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#17 2013-09-17 00:34:22

Synek
Member
Registered: 2013-03-24
Posts: 17

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

cfr wrote:

I can't see why it would cause this problem, no. It does seem odd though. On the other hand, I've never used cfdisk - maybe it doesn't do that stuff automatically. mis-aligned partitions can cause performance issues, but I wouldn't think they'd have anything to do with stopping shutdown. As far as I know, they just slow stuff down and maybe increase wear on some hardware.

Okay. Is there a log I can paste to give you information about what's happening during shutdown? There's a few worrying lines such as "failed to get D-Bus connection", "EXT4-fs (sda3) re-mounted. Opts: (null)", and sometimes some udev processes are killed. I have no idea what's normal and what's unusual here.

Offline

#18 2013-09-17 00:39:05

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

It depends whether the problem is occurring before or after the journal is stopped. If not, you can get information from journalctl (man journalctl for options to help parse it).


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#19 2013-09-17 00:41:54

Synek
Member
Registered: 2013-03-24
Posts: 17

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

cfr wrote:

It depends whether the problem is occurring before or after the journal is stopped. If not, you can get information from journalctl (man journalctl for options to help parse it).

Okay I'll have a look tomorrow. Thanks for the help.

Offline

#20 2013-09-17 11:21:57

Synek
Member
Registered: 2013-03-24
Posts: 17

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

How do I know if the problem occurs before or after the journal is stopped? Do you want the information regardless?

edit: also, how can I get the output of journalctl before I shutdown?

edit 2: It hangs after journal stops. All filesystems are unmounted, swap deactivated, loop devices detached, DM devices detached, and "storage is finalized", then it hangs on "kvm: exiting hardware virtualization".

Last edited by Synek (2013-09-17 11:59:00)

Offline

#21 2013-09-17 13:54:19

Synek
Member
Registered: 2013-03-24
Posts: 17

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

I left it hanging on reboot for about an hour, and when I came back it had rebooted.

There were 3 lines at the top of the screen (above the CLI login):

nouveau E[    DRM] Pointer to TMDS table invalid
nouveau E[    DRM] Pointer to flat panel table invalid
nouveau ![     PFIFO][0000:01:00.0] unhandled status 0x00000001

It now shuts down and reboots normally.

Another line appears on the cursor after a few seconds:

 nouveau E[     PFIF0][0000:01:00.0] playlist 0 update t

Last edited by Synek (2013-09-17 13:59:03)

Offline

#22 2013-09-17 21:53:48

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

It seems odd that it now shuts down and reboots normally. I guess it is good but it would be nice to know why.

Are you using virtualization? What graphics card do you have?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#23 2014-05-06 05:51:44

bpont
Banned
Registered: 2010-03-24
Posts: 161

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

I realize I'm necro-bumping, but I had received the exact same error message as this thread's author and a search brought me to this thread, so hopefully, someone may find this post useful in the future.

In the process of doing a fresh install, I installed NTP to synchronize my clock.  Per this section of the wiki, I ran these commands to start and test ntpd:

# ntpd -u ntp:ntp 
# ntpq -p

As a result, /mnt/dev remained busy and I wasn't able to umount /dev until I used pkill to stop ntpd.

Offline

#24 2014-08-09 04:07:20

heypeach
Member
Registered: 2014-08-09
Posts: 1

Re: Cannot unmount /mnt after installation & system hangs on shutdown.

It might be as simple as
cd ..
before you umount /mnt

Last edited by heypeach (2014-08-09 04:07:32)

Offline

Board footer

Powered by FluxBB