Need advice about running update-initramfs

If none of the more specific forums is the right place to ask

Need advice about running update-initramfs

Postby efrpcabo » 2020-08-20 15:56

Hi,

I have two disks in my computer:
- disk A with debian installed
- disk B with mp3 music

Sometimes, I need to take disk B to a friend house.
Before I disconect the disk, I comment fstab and crypttab and run update-initramfs.

My question is:
Is it really necessary to run update-initramfs in this situation?
Since this disk has not the operative system.
User avatar
efrpcabo
 
Posts: 98
Joined: 2013-08-08 06:36

Re: Need advice about running update-initramfs

Postby Bloom » 2020-08-20 16:23

No.
User avatar
Bloom
 
Posts: 291
Joined: 2017-11-11 12:23

Re: Need advice about running update-initramfs

Postby Head_on_a_Stick » 2020-08-20 17:11

Add nofail to the options for the drive in /etc/fstab to allow the system to boot normally even if the drive isn't connected.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12495
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Need advice about running update-initramfs

Postby CwF » 2020-08-20 18:00

You could just leave it out of fstab altogether and mount the drive using your favorite tool once you're up. You could even take it to your friends and come back without rebooting if you'd like.
CwF
 
Posts: 769
Joined: 2018-06-20 15:16

Re: Need advice about running update-initramfs

Postby efrpcabo » 2020-08-29 09:08

Hi,

Thank you all for your answers.

Does the same applies if the disk happens to be LUKS encripted?


CwF wrote:You could just leave it out of fstab altogether and mount the drive using your favorite tool once you're up. You could even take it to your friends and come back without rebooting if you'd like.


Could you elaborate on that?

What you are saying is that I could just plug and unplug the disk (hotplugging), as long as it is not mounted. Am I correct?
User avatar
efrpcabo
 
Posts: 98
Joined: 2013-08-08 06:36

Re: Need advice about running update-initramfs

Postby CwF » 2020-08-29 13:09

efrpcabo wrote:Could you elaborate on that?

What you are saying is that I could just plug and unplug the disk (hotplugging), as long as it is not mounted. Am I correct?

Correct, as long as your system supports it, yes.

I never modify fstab, well, unless I modify an image's boot disk identity.

No elaboration past that! My rule is only the boot disk in fstab. You can mount and dismount according to your desktop environment and your own preferences, LUKS is not a problem.
CwF
 
Posts: 769
Joined: 2018-06-20 15:16

Re: Need advice about running update-initramfs

Postby sgosnell » 2020-08-29 20:12

Disk b is connected via USB? If so you don't need it in fstab unless you have a very specific reason for insuring that it's mounted in the same place every time. Debian will mount it automatically in /media/user/UUID or in /media/user/disklabel if the drive has a label. It's safer to eject the drive before unplugging it. That's easily done via the file manager if it's automounted.
sgosnell
 
Posts: 794
Joined: 2011-03-14 01:49

Re: Need advice about running update-initramfs

Postby efrpcabo » 2020-08-30 11:19

sgosnell wrote:Disk b is connected via USB? If so you don't need it in fstab unless you have a very specific reason for insuring that it's mounted in the same place every time. Debian will mount it automatically in /media/user/UUID or in /media/user/disklabel if the drive has a label. It's safer to eject the drive before unplugging it. That's easily done via the file manager if it's automounted.


No.
It is connect through sata and LUKS encrypted.



CwF wrote:
efrpcabo wrote:What you are saying is that I could just plug and unplug the disk (hotplugging), as long as it is not mounted. Am I correct?

Correct, as long as your system supports it, yes.


It would be awesome to just connect/disconnect the sata power and data cables, and then use the gnome-disk-utility, or file manager, to unlock/lock LUKS and mount/unmount my hard drives at will.

I'm using Debian 9.13, 64 bits.
Does it support this?
User avatar
efrpcabo
 
Posts: 98
Joined: 2013-08-08 06:36

Re: Need advice about running update-initramfs

Postby CwF » 2020-08-30 12:07

efrpcabo wrote:I'm using Debian 9.13, 64 bits.
Does it support this?

Debian and most all, if not all OS's support it. You need to check if your sata controller supports it, some don't. There may be settings in the bios to enable/disable hot plug, default should be enabled.

It sounds like you are doing this without a dock! Yes that works too, be careful!
Connect data, then power. Disconnect power, then data.
CwF
 
Posts: 769
Joined: 2018-06-20 15:16

Re: Need advice about running update-initramfs

Postby efrpcabo » 2020-09-09 14:24

CwF wrote:
efrpcabo wrote:I'm using Debian 9.13, 64 bits.
Does it support this?

Debian and most all, if not all OS's support it. You need to check if your sata controller supports it, some don't. There may be settings in the bios to enable/disable hot plug, default should be enabled.


Thank you!

CwF wrote:
efrpcabo wrote:I'm using Debian 9.13, 64 bits.
It sounds like you are doing this without a dock! Yes that works too, be careful!
Connect data, then power. Disconnect power, then data.


Thank you!
User avatar
efrpcabo
 
Posts: 98
Joined: 2013-08-08 06:36


Return to General Questions

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable