LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-20-2016, 07:22 PM   #1
seabag
Member
 
Registered: Oct 2014
Location: Loja, Ecuador
Distribution: 12.04-nonPAE(beta)
Posts: 93

Rep: Reputation: Disabled
'dd' fails to run from live cd.


I want to clean up my hdd.
While in live CD I go to terminal and enter:
<sudo dd if=/dev/zero | pv | dd of=/dev/sda>

The return is 'permission to access sda denied'

Why am I denied from live CD to run 'dd' using sudo?
 
Old 07-20-2016, 07:33 PM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
Only first dd is running with sudo, it will not extend to other commands. Go root with
Code:
sudo -i
then do your dd.

Last edited by Emerson; 07-20-2016 at 07:36 PM.
 
2 members found this post helpful.
Old 07-20-2016, 08:42 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,398

Rep: Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992Reputation: 2992
Are you sure sda is the hard drive? Every once in a while a live cd makes a faux sda.

Whenever you run dd, check what the target is before you attempt the command. ALWAYS.
 
1 members found this post helpful.
Old 07-20-2016, 10:48 PM   #4
seabag
Member
 
Registered: Oct 2014
Location: Loja, Ecuador
Distribution: 12.04-nonPAE(beta)
Posts: 93

Original Poster
Rep: Reputation: Disabled
Thank you, Emerson. <sudo -i> did the trick. I was able to start 'dd.' dd is running now as I write this note from a live CD. By morning I should have a clean HDD onto which I shall re-install LinuxMint 17.2.
 
Old 07-21-2016, 04:11 AM   #5
Captain Pinkeye
Member
 
Registered: Oct 2012
Location: The Czech Republic
Posts: 280

Rep: Reputation: 97
Note that there are better ways of monitoring the progress of a dd; piping it through pv apparently slows the command down quite a bit (http://askubuntu.com/questions/21550...progress-of-dd).
 
Old 07-21-2016, 08:35 AM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Not sure filling hard drive with zeros is required prior to install Linux Mint...
I mean usually OS installers provide ways to prepare the destination disk
 
1 members found this post helpful.
Old 07-21-2016, 09:32 AM   #7
seabag
Member
 
Registered: Oct 2014
Location: Loja, Ecuador
Distribution: 12.04-nonPAE(beta)
Posts: 93

Original Poster
Rep: Reputation: Disabled
Thank you, Cap'n Pinkeye. It was from that page that I learned about 'pv!'
 
Old 07-21-2016, 09:38 AM   #8
seabag
Member
 
Registered: Oct 2014
Location: Loja, Ecuador
Distribution: 12.04-nonPAE(beta)
Posts: 93

Original Poster
Rep: Reputation: Disabled
Thanks for your thoughts, Keefaz. I think you are right, but I am desperate! Even fresh installs from live CD leave me with a clogged system presenting a jerky mouse, and Firefox that freezes the system requiring a hard shutdown. So I thought to erase everything...but Dban won't boot, probably due to secure boot setting in BIOS. BIOS is inaccessible without a password that is probably factory installed; so I cannot access the BIOS to remove the 'secure boot' setting. I figured second best is to wipe the hard drive with dd and start again with a fresh install. That is where I am at this morning, writing this to you from a live CD Mint 17.2. I will use this for a while to see if firefox crashes the system on live CD.
 
Old 07-22-2016, 01:51 AM   #9
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
Recent versions of dd on fedora have a 'status=progress' option to show progress. Another alternative is to use a program like shred.
 
Old 07-22-2016, 08:57 AM   #10
seabag
Member
 
Registered: Oct 2014
Location: Loja, Ecuador
Distribution: 12.04-nonPAE(beta)
Posts: 93

Original Poster
Rep: Reputation: Disabled
Thank you, Doug, for your response. LinuxMint17.2 and dd in combination are not new enough for the 'status=progress' option. However, the program 'pv' does show progress when included in the dd command. I have marked this thread closed. Thanks to all contributors from this generous community. I was able to run dd.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] Cron run fails at random points, throws: Attempting to re-run cron while.... Nighteyes Linux - Newbie 2 06-22-2012 06:08 AM
[SOLVED] LILO fails when run from live CD after installing Slack (skipped LILO during setup) sysfce2 Linux - Newbie 7 08-04-2009 01:16 AM
Kubuntu 8.04 live cd boot fails mala fide Ubuntu 3 08-19-2008 01:06 AM
Why my Live CD fails to boot? drbaburaj Linux - Newbie 1 11-18-2007 09:37 AM
qparted fails from live CD during install jbrush Ubuntu 3 01-26-2007 10:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:29 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration