LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-21-2020, 03:48 AM   #1
Linux0110
Member
 
Registered: Mar 2020
Posts: 69

Rep: Reputation: Disabled
Help with live usb (delicate move)


Hello guys I want to install open mandriva on a USB. My plan was to boot it in live mode and then install it on another flash drive to have it installed and use it as a complete OS.

I want to prevent any type of changes to my internal hard drives. So I think to boot up the flash drive, unmount the 2 internal hard drives and then install the system on the mounted flashdrive. My question is do I have to unmount the disks in the live environment and I'm ok or I have to fisically remove the hard drives from the computer? Also if I unmount the hard drives in the open mandriva live environment are they unmounted even when I boot up my main normal OS (that is installed on the 2 hard drives) or the os will automatically mount them as usual ?
 
Old 04-21-2020, 05:48 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,503

Rep: Reputation: Disabled
I always hate live distros that automatically mount internal drives!

You can boot up into live mode, insert your 2nd pendrive, open a terminal & type
Code:
dmesg | tail
that will show you what your 2nd pendrive has been designated, (probably /dev/sdd in your case with two internal HDDs), now you just install to that drive.

If you want to, you can of course, unmount your internal drives as well, best safe than sorry, but you should be offered all available drives to choose which to install to anyway.
 
Old 04-21-2020, 06:52 AM   #3
Linux0110
Member
 
Registered: Mar 2020
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fatmac View Post
I always hate live distros that automatically mount internal drives!

You can boot up into live mode, insert your 2nd pendrive, open a terminal & type
Code:
dmesg | tail
that will show you what your 2nd pendrive has been designated, (probably /dev/sdd in your case with two internal HDDs), now you just install to that drive.

If you want to, you can of course, unmount your internal drives as well, best safe than sorry, but you should be offered all available drives to choose which to install to anyway.
Thank you my friend. So I don't have to fisically remove them from the case just unmount them and I'm ok ?
Thank you very much again for the reply.
 
Old 04-21-2020, 07:46 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Linux0110 View Post
do I have to unmount the disks in the live environment and I'm ok or I have to fisically remove the hard drives from the computer? Also if I unmount the hard drives in the open mandriva live environment are they unmounted even when I boot up my main normal OS (that is installed on the 2 hard drives) or the os will automatically mount them as usual ?
If the drives are physically connected, there is still a (marginal) possibility that they can be written to. You could disconnect them logically with
Code:
echo > /sys/class/block/sdX/device/delete
where X is the drive letter (the precise file path may be different on Mandriva)

Second question: Unmounting the drives in the live OS has no effect on the disk-based OS.
 
Old 04-21-2020, 08:10 AM   #5
Linux0110
Member
 
Registered: Mar 2020
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
If the drives are physically connected, there is still a (marginal) possibility that they can be written to. You could disconnect them logically with
Code:
echo > /sys/class/block/sdX/device/delete
where X is the drive letter (the precise file path may be different on Mandriva)

Second question: Unmounting the drives in the live OS has no effect on the disk-based OS.
Is this command echo > /sys/class/block/sdX/device/delete dangerous maybe when I boot into the disk os the drives will be logically disconnected or this command only affects the live distro? And also where you wrote device you mean dev/sda, /dev/sdb ecc...
 
Old 04-21-2020, 08:21 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
The command tells the kernel to "forget" the disk. When you reboot, a new kernel is created in RAM and discovers all hardware anew. The new kernel is not affected.

Yes, I meant sda, sdb etc. Pick the correct ones, otherwise the Live OS will act funny.
 
Old 04-21-2020, 09:16 AM   #7
Linux0110
Member
 
Registered: Mar 2020
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
The command tells the kernel to "forget" the disk. When you reboot, a new kernel is created in RAM and discovers all hardware anew. The new kernel is not affected.

Yes, I meant sda, sdb etc. Pick the correct ones, otherwise the Live OS will act funny.
Thank you very much supportive people like you are the ones that make linux great.
 
Old 04-21-2020, 09:45 AM   #8
Linux0110
Member
 
Registered: Mar 2020
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
The command tells the kernel to "forget" the disk. When you reboot, a new kernel is created in RAM and discovers all hardware anew. The new kernel is not affected.

Yes, I meant sda, sdb etc. Pick the correct ones, otherwise the Live OS will act funny.
Bro I wrote echo > /sys/class/block/sdX//dev/sdb/delete and it says me "There is no such file or directory"
 
Old 04-21-2020, 09:55 AM   #9
Linux0110
Member
 
Registered: Mar 2020
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Linux0110 View Post
Thank you very much supportive people like you are the ones that make linux great.

ok now I found the correct syntax but the the terminal says permission denied even as root.
 
Old 04-21-2020, 10:31 AM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Linux0110 View Post
Bro I wrote echo > /sys/class/block/sdX//dev/sdb/delete and it says me "There is no such file or directory"
/sys/class/block/sdb/device/delete (without dev and sdX, but with device). As I said, might be different in your distro.
 
Old 04-21-2020, 10:46 AM   #11
Linux0110
Member
 
Registered: Mar 2020
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
/sys/class/block/sdb/device/delete (without dev and sdX, but with device). As I said, might be different in your distro.
I found out the syntax but It says permission denied even executing the command as root.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Small But Delicate Partition Issue LinuxNoobX Linux - Newbie 9 01-24-2012 04:29 AM
Delicate situation: How to handle? jiml8 General 12 01-21-2009 12:46 PM
LXer: Tiny Asus computer great for travel, delicate hands LXer Syndicated Linux News 0 03-25-2008 09:20 AM
delicate question.... jjd228 Linux - Software 20 05-29-2004 10:35 AM
Delicate Soft-RAID problem thewindk Linux - Hardware 0 11-08-2003 03:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration