The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to edit /etc/fstab when root was mounted as read only ilan Linux 3 02-28-2008 10:51 PM
Moving a file system to a new partition Remi SUN Solaris 7 12-04-2006 06:10 AM
copying/moving partition antalexi SUN Solaris 4 11-11-2006 06:59 PM
Ran out of space on /dev/root partition Martyn Filesystems, Disks and Memory 2 07-07-2006 09:58 AM
moving space from one partition to another jason6792 UNIX for Advanced & Expert Users 4 10-08-2001 06:54 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-07-2005
d11wtq d11wtq is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 42
Partition numbering (0,5 or 0,0 etc) ????

Hi,

I editted my post so you can skip straight to the bottom if u like (thats what i need)....

I posted somewhere else on the net and got some help up to this point but it seems to have gone stale so i'm hoping I can find out what I need to know here.

I run SuSE 9.2. I "did" have a dual boot with WinXP but have now deleted that windows partition in favour of a reiser partition for SuSE. I'm moving / from /dev/hdc6 (the end of the disk near enough), to the new partiton (3 times the size) on /dev/hdc1 (start of the disk, mounted as /vol1/).

The guidance I had so far was as follows:

1. Create /dev and /proc on /dev/hdc1 as root but leave them empty
2. Run cp -av /bin /vol1/ etc etc to copy all files from the root EXCEPT /dev and /proc
3. [This is what I'm confused with] Edit fstab and reboot

Now then.... surely since fstab is /etc/fstab something knows which partition to look for fstab on before it gets read? (GRUB???). So I dont understand their directions. Surely I need to edit GRUB somehow?

I like to "think" I'm very computer literate and love to do things myself but because I know I could do something very wrong here I need some help :P

Please don't come back with any comments about doing it another way (with partitioning software and resizing etc), I've got this far, I might as well finish it off.

Thanks for any help offered guys, it's much appreciated.

EDIT || I've edited fstab on the partition I now want to boot to and made a backup of the orginal too just in case. I know I did that part right but now the bootloader is a bit confusing... but once someone explains this to me it'll be easy. What does the notation x,y represnt?

(hd0,5)/boot/vmlinuz root=/dev/hdc6 vga=0x305 selinux=0 splash=silent resume=/dev/hdc5 desktop elevator=as showopts

Here it was originally 0,5 for /dev/hdc6 (is that counting hard disk 0 (first one, or primary, followed by partition 5 (index from zero which is how /dev/hdc6 comes about)). If it is then I guess I just change 0,5 to 0,0 since the new boot partition is the first one on the disk?

Last edited by d11wtq; 06-07-2005 at 03:22 PM..
  #2 (permalink)  
Old 06-07-2005
d11wtq d11wtq is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 42
Bump (Didn't realise editting title doesn't reflect in the thread list like phpBB)
  #3 (permalink)  
Old 06-07-2005
d11wtq d11wtq is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 42
Making it whirl :)

Never mind guys I sorted this.

Turns out it is how I expected.

(hd,x,y)/boot/vmlinuz

x == disk number starting at zero
y == partition number starting at zero

If anyones interested you need to do the following to move / somewhere else... (turns out /dev was needed after all) [I'll assum you created the new partition to move it ono successfully on formatted it with a *nix comptiable filesystem].

1. Login as root
2. mkdir /mount_point_of_new_partition/proc
3. cp -av /bin/ /boot/ /dev/ /home/ /lib/ /media/ /opt/ /root/ /sbin/ /srv/ /sys/ /usr/ /var/ /mount_point_of_new_partition/ <----- EVERYTHING in / except /proc (or you'll infinte loop it)
4. Edit your boot loader to point to the disk and partition number of the new mount point (I used yast which has a grub editor to make this easier... then simly replaced everything that had 0,5 (/dev/hdc6) with 0,0 (my new partition).
5. cp /mount_point_of_new_partition/etc/fstab /mount_point_of_new_partition/etc/fstab.backup
6. pico /mount_point_of_new_partition/etc/fstab
[Now substitue / with /mount_point_of_new_partition and CTRL+O --> Enter to save it]
7. Reboot

When it fires up again run....

df -ah

....just to make sure everything mounted OK.

If it's all OK then go ahead and delete everything on /mount_point_of_new_partition/ but be very careful not to

rm -rf /*

instead (yes I have done it recently)

NOTE: It's probably best to jot down on a bit of paper exactly what your bootloader is pointing to before you change it. It'll be far easier to recover if you can't get the system to boot back up again this way.

Side note: Kool forum.... I shall be coming here often to see what's going on (I moderate another very well known forum but not for *nix... for PHP ).

Laterz
  #4 (permalink)  
Old 06-08-2005
tom_xx_hu@yahoo tom_xx_hu@yahoo is offline
Registered User
  
 

Join Date: May 2005
Posts: 40
Quote:
Originally Posted by d11wtq
Never mind guys I sorted this.
6. pico /mount_point_of_new_partition/etc/fstab
[Now substitue / with /mount_point_of_new_partition and CTRL+O -->
Laterz
I don't understand step 6. "/mount_point_of_new_partition" would just become "/" after reboot. Did you mean substituting old root partition device (hdc6) with new root partition device (hdc1)?

Tom
  #5 (permalink)  
Old 06-09-2005
d11wtq d11wtq is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 42
Quote:
Originally Posted by tom_xx_hu@yahoo
I don't understand step 6. "/mount_point_of_new_partition" would just become "/" after reboot. Did you mean substituting old root partition device (hdc6) with new root partition device (hdc1)?

Tom
Yes sorry, I worded it wrongly. I didn't physically move the partition, I moved the files to a different partition
  #6 (permalink)  
Old 06-09-2005
d11wtq d11wtq is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 42
A quick note: If you noticed a post shortly after I posted these instructions there's one more step to do. I made the mistake and ended up with a

GRUB > _

Prompt at the second reboot.

When you reboot into your new partition the /boot/ files will be the old ones (it booted from your old partitions config files at first).

You need to finally either

cp -a /old_mount_point/boot/ /

OR reconfigure GRUB like you did before the reboot.

Thats it.
  #7 (permalink)  
Old 06-10-2005
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
Quote:
Originally Posted by d11wtq
Bump (Didn't realise editting title doesn't reflect in the thread list like phpBB)

Please dont bump questions if they are not answered.

Read the FAQs again please.

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.




BUT... thanks for updating your solution... that helps greatly with the main purpose for this site. Which is to provide a repository of knowledge for our mutual consumption.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0