Fedora Linux Support Community & Resources Center
  #1  
Old 4th April 2012, 11:23 AM
natas00 Offline
Registered User
 
Join Date: Mar 2012
Location: canada
Posts: 5
linuxfedorakonqueror
Error moving file

I used mv to move my file and that messed everthing up, how do I restore the mv file cp?

mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img

thanks
Reply With Quote
  #2  
Old 4th April 2012, 11:36 AM
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Age: 57
Posts: 14,676
linuxfirefox
Re: mv

Reverse the command, but use caution and thought.
PHP Code:
mv /boot/initramfs-$(uname -r)-nouveau.img /boot/initramfs-$(uname -r).img 
However, does the computer even boot since you've moved the file?

I changed the title of the thread to something more descriptive.
__________________
Glenn
The Bassinator © ®

[SIGPIC][/SIGPIC]
Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #3  
Old 4th April 2012, 12:07 PM
natas00 Offline
Registered User
 
Join Date: Mar 2012
Location: canada
Posts: 5
linuxfedorakonqueror
Re: Error moving file

no it does not boot.
Reply With Quote
  #4  
Old 4th April 2012, 02:53 PM
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,316
linuxfirefox
Re: Error moving file

Can you boot a LiveCD or rescue disk or access the Fedora /boot partition from another system, then mv/rename the file? Or do you have another kernel to boot?

That original mv command you used, if you do nothing else, leaves your system without an initramfs.img. You need to follow it with a
Code:
# dracut /boot/initramfs-$(uname -r).img $(uname -r)
to create a new initramfs.img before you reboot.
Reply With Quote
  #5  
Old 4th April 2012, 04:01 PM
natas00 Offline
Registered User
 
Join Date: Mar 2012
Location: canada
Posts: 5
linuxfedorakonqueror
Re: Error moving file

yes I can boot into a previous version.
Reply With Quote
  #6  
Old 4th April 2012, 04:33 PM
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,316
linuxfirefox
Re: Error moving file

Good. Then you should try to rename the original .img file back to what it was. However, do not use the command with "uname -r" because that would use the older kernel you are currently running, and you would still not have a valid initramfs file for the newer kernel.

Best thing would probably be to rename the /boot/initramfs-<kernelversion>-nouveau.img file in place, removing the "-nouveau" part. So it would be
Code:
mv  /boot/initramfs-<kernelversion>-nouveau.img /boot/initramfs-<kernelversion>.img
where <kernelversion> = the version of the newer kernel.
Reply With Quote
  #7  
Old 4th April 2012, 07:02 PM
natas00 Offline
Registered User
 
Join Date: Mar 2012
Location: canada
Posts: 5
linuxfedorakonqueror
Re: Error moving file

thank-you problem solved.. never doing that again.
Reply With Quote
  #8  
Old 4th April 2012, 07:21 PM
sonoran Offline
Registered User
 
Join Date: May 2005
Location: Sonoran Desert
Posts: 2,316
linuxfirefox
Re: Error moving file

Quote:
Originally Posted by natas00 View Post
never doing that again.
You know what they say - when the horse throws you it's best to climb right back on. Or as Nietzsche put it, "What doesn't kill me makes me stronger. And I can always reinstall."
Reply With Quote
  #9  
Old 4th April 2012, 09:33 PM
natas00 Offline
Registered User
 
Join Date: Mar 2012
Location: canada
Posts: 5
linuxfedorakonqueror
Re: Error moving file

lol ..true
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] File vanished when moving Majara Using Fedora 2 29th April 2011 04:48 AM
can moving a file alot corrupt it? DeadPark121 Using Fedora 5 24th April 2009 06:56 PM
Moving a part of an HTML file to another file panpol Programming & Packaging 5 28th October 2005 09:03 AM
Moving a part of html file to another panpol Using Fedora 2 25th October 2005 01:59 PM


Current GMT-time: 07:31 (Saturday, 23-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat