Improving skipmount

Discussions about what to change in future versions (except software request).
Post Reply
Posts: 4
Joined: 31 Dec 2014, 11:02

Improving skipmount

Post by adigulla » 05 Jan 2015, 20:11

I have a couple of ideas how to improve the skipmount kernel option.

As explained in this post, I use SRCD to wipe hard drives. If I have to abort the process, then I have to skip the drive for the next boot or the boot will "hang."

This is tedious:

1. I need to pass boot options to the correct kernel
2. I need to know or guess the correct device to skip in advance or I have to boot, wait until it hangs, note the device, reboot, type the name with a foreign keyboard layout, ...
3. Repeat step #2 when something goes wrong.

Suggestions to improve the process:

a) Ask which devices to mount

Instead of asking which device to skip mounting, add a boolean "askmount" option. If this option is used, then the mount script will first list all devices. Then it will offer a curses-based list where I can (de-)select individual devices.

b) Timeout

When the mount command doesn't succeed after 5-10 seconds, ask "Still looking for the partition table of this device. Continue/abort?"


A. Digulla

Posts: 1129
Joined: 07 Apr 2010, 16:19

Re: Improving skipmount

Post by gernot » 05 Jan 2015, 21:45

Tried you [alt] [sysrq] I or [alt] [sysrq] E ?
This should kill all prozesses expect init who called the mount.

A timeout is hard to realize in the init shellscript.

The problem is that UDF mount scan the full device for a valid "superblock".
Thinking about a optional option like mountfs=FAT instead using auto ...


Posts: 4
Joined: 31 Dec 2014, 11:02

Re: Improving skipmount

Post by adigulla » 06 Jan 2015, 19:07

Timeout for bash: ... sary-delay

It should be possible to change the script to return exit codes to determine whether the mount was killed. But I'm not sure if it's always possible to kill mount. Maybe you can file a feature request to the "UDF mount" guys asking for a timeout or an option "search only the first 10 MB" + an exit code which would allow your script to ask the user.

But maybe the most simple solution would be to list the devices if the kernel option "askmount" is specified and allow my to select which devices to try. I think I could help you with the scripting part (list devices, select them) and you provide the code to call my script if the option "askmount" is passed to the kernel.

Post Reply