# [solved]"A start job is running for device dev-sda6.device"

## WvR

Symptom: when booting (grub2, kernel made with genkernel), the machine starts up, the messages about the modules scroll across the screen, then systemd starts, and all is [ OK ] until I get a strange message:

```
"A start job is running for device dev-sda6.device"
```

A timer then counts up to exactly 1m30s, then there is an error, and I am given a "rescue shell". Looking around with 

```
journalctl -xb
```

 I find:

```
 "timed out waiting for device dev-sda6.device"
```

/dev/sda6 is my swap partition.

Background: today (June 1 2014) I updated my gentoo laptop

```
emerge --sync

emerge -auvDN world
```

The update proceeded without errors. Then

```
emerge @preserved-rebuild
```

and all seemed to be OK. Kernel 3.12.13-gentoo.

Actions I have already tried:

 upgraded the kernel to 3.12.20-gentoo with genkernel - no improvement

 did a revdep-rebuild - no packages were listed for update

 recompiled systemd - no improvement

 remade the swap partition (booted with rescue CD, then mkswap /dev/sda6, but no improvement)

I searched the forum, found some posts, but all are about device mapper, LVM and cryptsetup and I do not use those packages. Everything was working perfectly so I am at a loss....[/list][/list]Last edited by WvR on Sun Jun 01, 2014 11:38 pm; edited 1 time in total

----------

## DONAHUE

had this last week while playing with genkernel-next, my fix:

boot a live cd/usb or use a kernel that still boots

```
lspci -k
```

 determine the drivers used for your hard drives

mount gentoo partitions, enter the chroot:

```
genkernel --menuconfig all
```

enable the hard drive drivers as builtin vice module, exit  several times save the configuration when asked, allow genkernel to finish

Strange that my / had no problem but the rest of the fstab entries produced "A start job is running for device dev-sdd_.device"

Solution worked for me, hopefully for you also.

----------

## WvR

I solved the problem! On an arch-linux forum there was a similar complaint, and the cause was found to be the setting of

```
CONFIG_FHANDLE=n
```

in the kernel configuration. Systemd expects it to be "Y". In fact, when compiling systemd there was a warning, but I have had this warning always so I did not think it was a problem. Anyway, I set 

```
CONFIG_FANOTIFY=y

CONFIG_AUTOFS4_FS=m

CONFIG_FHANDLE=y
```

rebuilt kernel, and it works. Maybe the ebuild of systemd should be more explicit that 

```
CONFIG_FHANDLE=n
```

 may give terribe results, apparently depending on the kernel version (kernels older than 3.12.20-gentoo worked happily with 

```
CONFIG_FHANDLE=n
```

)

----------

## DONAHUE

The wiki does give emphasis by using Mandatory http://wiki.gentoo.org/wiki/Systemd:

 *Quote:*   

> Kernel configurationMandatory options
> 
> General setup  --->
> 
> 	[*] Control Group support
> ...

 

Good find. Our problems were apparently unrelated.

----------

## WvR

I am also surprised: first, I am surprised that the update of systemd is merged, even if an necessary kernel setting is missing. I would have hoped that in this case, the ebuild should just give an error. Secondly, I have been using genkernel for a while on my machines, so I am puzzled as to how the CONFIG_FHANDLE became set to "N" - I expect that genkernel switches this feature on by default, especially if you use the systemd-profile.

----------

## DONAHUE

interestingly, fhandle is one of the things that is not mentioned in either /usr/share/genkernel/defaults/kernel-config or /usr/src/linux/arch/x86/configs/x86_64_defconfig. 

The help for fhandle:  *Quote:*   

> Symbol: FHANDLE [=y] 
> 
> Type  : boolean
> 
> Prompt: open by fhandle syscalls 
> ...

  indicates that it should be automatically enabled for gentoo systemd. This is on a 3.14.4 kernel. As best I remember when I switched to systemd (3.10.? maybe) I encountered the warning and recompiled to make the change. Issuing a warning vice refusing to build is not uncommon.

----------

## WvR

A, perhaps here we have a root cause....   :Very Happy:  For reasons I don't remember, on my machine genkernel does not work correctly if I use the "systemd enabled" profile. So I always do the following:

eselect profile set 1 # simplest profile

emerge genkernel grub # genkernel and grub with simple profile

genkernel --loglevel=3 --menuconfig all # manually check necessary settings for Intel graphics, sound card, USB network adapter

grub2-mkconfig -o /boot/grub/grub.cfg

emerge -Ca genkernel # get rid of genkernel

eselect profile set 5 # systemd-enabled profile

emerge grub # re-emerge grub with new profile settings

so there you have it... When I make my kernel, genkernel is not aware of systemd....And it has been working just fine for quite a while   :Very Happy: 

----------

## DONAHUE

IIRC, genkernel-next was recently devised to include use with systemd and uefi.  Which one are you using? If genkernel-next: did switching to genkernel-next coincide with CONFIG_FHANDLE=n causing becoming an actual problem? 

 *Quote:*   

> emerge -s genkernel
> 
> Searching...    
> 
> [ Results for search key : genkernel ]
> ...

 

----------

## luciano

I upgraded from 3.10.7-r1-gentoo-sources to 3.14.14-gentoo-sources and had a similar problem.

This was fixed by setting the systemd flag (running make menuconfig, press '/' and then 'SYSTEMD', to find this option). This enabled a bunch of flags which appears to have fixed it. I'm guessing is the same as running with 'systemd profile' in the posts above ...

----------

