[SOLVED] login to live cd as Root
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED] login to live cd as Root
The title says it all...how can I become Root for all things in the live cd?
Many thanks,
Charles
[Edit] I suppose I should explain. I want to boot the live cd and open the Disks utility to make an image of the sda drive, but I am always presented with "You don't have permission to..."
Many thanks,
Charles
[Edit] I suppose I should explain. I want to boot the live cd and open the Disks utility to make an image of the sda drive, but I am always presented with "You don't have permission to..."
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Some people make happiness wherever they go, others whenever they go.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: login to live cd as Root
If you need to make an image for backup purposes, you're better off using clonezilla.
http://clonezilla.org/downloads/downloa ... nch=stable
http://clonezilla.org/downloads/downloa ... nch=stable
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: login to live cd as Root
"can I become root for all things in the live cd" Yes. That's all I am going to say. It should be sufficient to just run Disks. A 'permissions' problem might be because the destination is mounted, for example. Being root won't help with that.
Imaging a drive doesn't need Disks...
...does exactly what it says on the tin, copies drive /dev/sr0 into drive /dev/sr1. It doesn't care if one or both are mounted and the command will generate useless rubbish in the destination.
Imaging a drive doesn't need Disks...
sudo cp /dev/sr0 /dev/sr1
...does exactly what it says on the tin, copies drive /dev/sr0 into drive /dev/sr1. It doesn't care if one or both are mounted and the command will generate useless rubbish in the destination.
Re: login to live cd as Root
Thanks for the reply! I have a Parted Magic boot disc, and have made drive images with Clonezilla. Haven't had the courage to Secure Erase my SSD and restore an image to test it.catweazel wrote:If you need to make an image for backup purposes, you're better off using clonezilla.
http://clonezilla.org/downloads/downloa ... nch=stable
Some people make happiness wherever they go, others whenever they go.
Re: login to live cd as Root
Thanks for the reply! Not exactly what I'm looking for. I would prefer to save an image to another disc, not overwrite the disc with the files from the source disc, if that makes sense. Then I can restore the latest image to the source if a disaster occurs.Mute Ant wrote:"can I become root for all things in the live cd" Yes. That's all I am going to say. It should be sufficient to just run Disks. A 'permissions' problem might be because the destination is mounted, for example. Being root won't help with that.
Imaging a drive doesn't need Disks...
sudo cp /dev/sr0 /dev/sr1
...does exactly what it says on the tin, copies drive /dev/sr0 into drive /dev/sr1. It doesn't care if one or both are mounted and the command will generate useless rubbish in the destination.
With respect, what do you mean by "generate useless rubbish in the destination"?
Some people make happiness wherever they go, others whenever they go.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: login to live cd as Root
There's no need to secure erase an SSD before restoring an image, and clonezilla has saved my neck more times than I can remember.chowse wrote: Thanks for the reply! I have a Parted Magic boot disc, and have made drive images with Clonezilla. Haven't had the courage to Secure Erase my SSD and restore an image to test it.
Cheers.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: login to live cd as Root
Wow, I didn't realize that. The weekend's coming up, I'll try to restore yesterday's CZ image and report back. Thanks for sticking with me.catweazel wrote:There's no need to secure erase an SSD before restoring an image, and clonezilla has saved my neck more times than I can remember.chowse wrote: Thanks for the reply! I have a Parted Magic boot disc, and have made drive images with Clonezilla. Haven't had the courage to Secure Erase my SSD and restore an image to test it.
Cheers.
BTW, where are you? I'm in West Tennessee.
Some people make happiness wherever they go, others whenever they go.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: login to live cd as Root
You're most welcome.chowse wrote:Thanks for sticking with me.
The land of OzBTW, where are you? I'm in West Tennessee.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: login to live cd as Root
"...if that makes sense..." Oh yes. Just replace the destination with a file name on the backup drive...
That might be the problem you started with, if you told Disks to write to a mounted partition instead of to a file in the mounted partition.
"generate useless rubbish" If a file system is mounted and writeable, you should only access it file-by-file using the mount point. What's stored on the drive is a work-in-progress until the file system is unmounted again.
sudo cp /dev/sda1 /media/mute/toshipod2/2017-12-08-sda1-ext4.img
That might be the problem you started with, if you told Disks to write to a mounted partition instead of to a file in the mounted partition.
"generate useless rubbish" If a file system is mounted and writeable, you should only access it file-by-file using the mount point. What's stored on the drive is a work-in-progress until the file system is unmounted again.
Re: login to live cd as Root
Alright, can I do the "sudo cp..." command while logged in as a member of the admin group with my regular user account?Mute Ant wrote:"...if that makes sense..." Oh yes. Just replace the destination with a file name on the backup drive...
sudo cp /dev/sda1 /media/mute/toshipod2/2017-12-08-sda1-ext4.img
That might be the problem you started with, if you told Disks to write to a mounted partition instead of to a file in the mounted partition.
"generate useless rubbish" If a file system is mounted and writeable, you should only access it file-by-file using the mount point. What's stored on the drive is a work-in-progress until the file system is unmounted again.
Next, assuming my SSD crashes, how would I restore that img?
With respect to catweazel, do you agree there's no need to secure erase my SSD before restoring an image?
BTW, both of you have been a great source of information, thank you!!
Some people make happiness wherever they go, others whenever they go.
Re: login to live cd as Root
"Alright, can I do the "sudo cp..." command while logged in as a member of the admin group with my regular user account?" If your sda1 is mounted, part of your OS, no. In a pinch you can boot into Recovery Mode, where the file systems are read-only, but if you are going to reboot anyway, a Live Session is friendlier, with a graphic environment.
"how would I restore that img?" I'm sure you could have guessed this one...
Secure-Erase only clears the SSD blocks, I don't think it would change the performance any more than writing useful data would.
"how would I restore that img?" I'm sure you could have guessed this one...
sudo cp /media/mute/toshipod2/2017-12-08-sda1-ext4.img /dev/sda1
Secure-Erase only clears the SSD blocks, I don't think it would change the performance any more than writing useful data would.
Re: login to live cd as Root
Yes, that much was obvious. Respectfully, I'm still wondering about doing all this as 'charles' or needing to boot to the live cd and do it from there.Mute Ant wrote:--sigh-- You could have guessed this one...
sudo cp /media/mute/toshipod2/2017-12-08-sda1-ext4.img /dev/sda1
Also, my long experience with SSD's tells me that you just can't treat them like spinny discs. I have a lot of experience in this sort of thing in Windows, and it was always necessary to erase the SSD before writing an image to it. Wondering if that's true in Mint.
If I'm boring or frustrating anyone, I sincerely apologize.
Some people make happiness wherever they go, others whenever they go.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: login to live cd as Root
It has never been necessary to secure erase an SSD in any operating system, including Windwoes. And, depending on how you do the erasure, you are likely drastically shortening the life of the SSD. The only way to correctly erase an SSD is to use the ATA secure erase command, and I am aware of only one program that does that on Windwoes, and not all SSDs support the ATA command set. Any other method of erasing the SSD will quickly ruin it. Simply restore your image, and when it's booted, use the fstrim command to erase unused blocks:chowse wrote:I have a lot of experience in this sort of thing in Windows, and it was always necessary to erase the SSD before writing an image to it. Wondering if that's true in Mint.
Code: Select all
fstrim /
sudo nano /etc/cron.daily/fstrim
Add the following to the newly created file:
Code: Select all
#!/bin/sh
fstrim /
sudo chmod +x /etc/cron.daily/fstrim
Once a day, your system will safely clear unused blocks. This will maintain your SSD's performance at its peak.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: login to live cd as Root
Thank you kindly! Merry Christmas!!catweazel wrote:It has never been necessary to secure erase an SSD in any operating system, including Windwoes. And, depending on how you do the erasure, you are likely drastically shortening the life of the SSD. The only way to correctly erase an SSD is to use the ATA secure erase command, and I am aware of only one program that does that on Windwoes, and not all SSDs support the ATA command set. Any other method of erasing the SSD will quickly ruin it. Simply restore your image, and when it's booted, use the fstrim command to erase unused blocks:chowse wrote:I have a lot of experience in this sort of thing in Windows, and it was always necessary to erase the SSD before writing an image to it. Wondering if that's true in Mint.
To have the SSD trimmed regularly, do this in a terminal:Code: Select all
fstrim /
sudo nano /etc/cron.daily/fstrim
Add the following to the newly created file:
ctrl-o <enter> to save, then ctrl-x to exit, then:Code: Select all
#!/bin/sh fstrim /
sudo chmod +x /etc/cron.daily/fstrim
Once a day, your system will safely clear unused blocks. This will maintain your SSD's performance at its peak.
Some people make happiness wherever they go, others whenever they go.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: login to live cd as Root
You're very welcome.chowse wrote: Thank you kindly!
Funny you should say that. I'm celebrating Christmas this afternoon with my family because I'll be visiting Indonesia over Christmas and the new yearMerry Christmas!!
I'm off to see Mt Agung blow its top.
All the best of the season to you too.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.