LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 11-30-2010, 12:05 PM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Question Will this resize method work?


So I have a partition I wanna make smaller. I can use GParted but this is not secure. Even with backup - there are tons of personal files, I can't check 'em all if they are correct after resizing. So I thought maybe I can create a dir on another machine and do something like
Code:
cp -a / /mnt/0 # which is a mounted directory on another machine
and after repartitioning HDD get everithing back this way. Will it work?
 
Old 11-30-2010, 12:11 PM   #2
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
More info. What I need to do is the following. I have a 80 GB laptop HDD with Linux on it. root and swap. I need to install Windows also, as a second OS. From CD which came with the laptop. That CD is not an installer, it has an image of an HDD and what it does is it formats the whole laptop HDD and extracts Windows to a partition size of which you can select. So I need to save whole Linux system, install Windows XP from that CD and add Linux to a smaller partition so I'll have dual boot. How can I do it. I don't want to reinstall Linux.
 
Old 11-30-2010, 12:19 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
Your method should work. But don't forget that you have to update your UUIDs/devices in your fstab after you have copied your files back, and then reinstall your bootloader.

Edit: And don't forget taht if your Windows is XP, it works best in the first primary partition.

Last edited by TobiSGD; 11-30-2010 at 12:21 PM.
 
Old 11-30-2010, 12:43 PM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Question

To install a bootloader I should do this?
Code:
sudo grub
root (hd0,2)
setup (hd0)
 
Old 11-30-2010, 01:12 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
It seems to me that you are using grub-legacy, sorry, I don't know about that. With grub2 (on Debian, copied the files from a live-medium)I would simply do
Code:
mount /dev/sdXY /mnt
mount -o bind /dev /mnt/dev
chroot /mnt
grub-install /dev/sdX
update-grub
 
Old 11-30-2010, 01:22 PM   #6
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Yeah, GRUB-Legacy. If anyone knows, let me know please.
 
Old 11-30-2010, 08:23 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
Different ways to install grub-legacy from a live-CD: http://members.iinet.net/~herman546/...b_with_Live_CD
 
Old 12-05-2010, 04:06 PM   #8
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Question

Quote:
Originally Posted by TobiSGD View Post
Your method should work. But don't forget that you have to update your UUIDs/devices in your fstab after you have copied your files back, and then reinstall your bootloader.

Edit: And don't forget taht if your Windows is XP, it works best in the first primary partition.
Is this correct for my purpose?
Code:
tar cpvf SDA1.tar /
Doesn't it lack anything? Doing it from Live CD of course... And thanks for help.
 
Old 12-06-2010, 01:52 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
If you do that from a live-CD, you will backup you live-CD, and not your installed system. You have to mount the filesystem and the backup that.
 
1 members found this post helpful.
  


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
Method to batch resize photos with options michapma Linux - Software 10 02-08-2010 10:49 AM
why wireless networking will not work with any method I try? MsDoomshroom Linux - Laptop and Netbook 26 04-25-2008 09:46 AM
Does this install method actually work for Creative X-Fi ? svet-am Linux - Hardware 1 05-05-2006 02:50 AM
input method doesn't work sometimes NeoAnderson Debian 0 10-01-2005 07:57 AM
why does my P.print method work ? Dominik Programming 1 01-26-2004 04:11 AM


All times are GMT -5. The time now is 03:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration