LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 04-15-2007, 11:51 PM   #1
jackuret
LQ Newbie
 
Registered: May 2004
Location: hinsdale, Illinois
Distribution: whitebox 9
Posts: 8

Rep: Reputation: 0
Question move directory to another partition


Hi-
I'm running scientific linux 4, which is essentially
RH 4. I want to move my boot directory from /dev/hda6
to /dev/hda2, because I may be having a problem with
the 1024 cylinder limit. Help, please. Both partitions are listed under /mnt.
Regards,
jackuret
 
Old 04-16-2007, 03:16 AM   #2
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
Just to clarify, you want to move /boot from being on /dev/hda6 to /dev/hda2? However you then go on to say that both are listed under /mnt?

Could you post your /etc/fstab file here?
 
Old 04-16-2007, 06:35 PM   #3
jackuret
LQ Newbie
 
Registered: May 2004
Location: hinsdale, Illinois
Distribution: whitebox 9
Posts: 8

Original Poster
Rep: Reputation: 0
My fstab file (copied in Rescue mode)

Quote:
Originally Posted by Jongi
Just to clarify, you want to move /boot from being on /dev/hda6 to /dev/hda2? However you then go on to say that both are listed under /mnt?

Could you post your /etc/fstab file here?
LABEL=/ / ext3 defaults 1 1

Here it is
_____________________________________________
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda7 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/hdd4 /mnt/zip auto noauto,owner,kudzu 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hda1 /root/windirs/WINC vfat noauto,user,kudzu 0 0
/dev/hda5 /root/windirs/WIND vfat noauto,user,kudzu 0 0
/dev/hda2 /boot ext3 defaults 1 2
 
Old 04-16-2007, 11:18 PM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
According to your /etc/fstab, /boot is in hda2.
The only way you can have a 1024 cylinder issue with that operating system is if the bios is set to use "CHS" instead of "large" or "LBA". If the bios is a newer one (1999 to present), it should support LBA and will use that setting by default, if it is set to "Auto", it will use LBA, if LBA is supported.
Or the boot loader you are using is an older version of lilo, grub is the default boot loader in this distribution.
What is the exact problem you are having? Perhaps that information will yield better help.
 
Old 04-16-2007, 11:35 PM   #5
jackuret
LQ Newbie
 
Registered: May 2004
Location: hinsdale, Illinois
Distribution: whitebox 9
Posts: 8

Original Poster
Rep: Reputation: 0
move directory to other partition

Quote:
Originally Posted by Junior Hacker
According to your /etc/fstab, /boot is in hda2.
The only way you can have a 1024 cylinder issue with that operating system is if the bios is set to use "CHS" instead of "large" or "LBA". If the bios is a newer one (1999 to present), it should support LBA and will use that setting by default, if it is set to "Auto", it will use LBA, if LBA is supported.
Or the boot loader you are using is an older version of lilo, grub is the default boot loader in this distribution.
What is the exact problem you are having? Perhaps that information will yield better help.
Well, actually when I CD to /boot and do /dbin/df it tells me I'm in /dev/hda6. All this is while in rescue mode after chroot /mnt/sysimage.
That's probably set by the first LABEL command in the fstab file, no?
The basic problem is that I'm double-booting with a new windows xp(home) installation. I've prepared linux.bin file and modified the windows boot.ini file, so that I get my choice of windows or linux when I boot. When I choose linux, the creen displays "grub" and the system freeses.
I've got two 20 Gb disks, so maybe there's something I need to change in the bios?
 
Old 04-17-2007, 12:29 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,318

Rep: Reputation: 1033Reputation: 1033Reputation: 1033Reputation: 1033Reputation: 1033Reputation: 1033Reputation: 1033Reputation: 1033
Perhaps if you had described the problem rather than telling us what you think the answer is you'd have gotten better help earlier.
Was this box being booted via grub prior to the XP install ?. If so, it obviously isn't a BIOS cylinder problem.
Moving the /boot without re-installing grub will only introduce more problems.

Simple solution if you insist on using the XP loader would be to reinstall grub into the (partition) boot sector record and copy it again as you did before.
Best solution would to to use grub to do the dual booting - in that case re-install into the MBR, and add an entry for Windoze to menu.lst.
 
Old 04-17-2007, 12:34 AM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Well
You must have made changes in your /etc/fstab, because it does not make sense. You have a Linux swap and a /boot partition, but the operating system which is in /, is not in the /etc/fstab. /dbin/df is not a valid command in my Linux. And you say you have two hard drives but there is nothing suggesting that in /etc/fstab. The last line clearly shows you /boot is in /dev/hda2. And you have two Windows installations.
Maybe you did not write it exactly the way it is. It would be better to post the results of the command:
Code:
fdisk -l
But if that is exactly the way your /etc/fstab looks like, it is obvious why it won't boot, you have no Linux installation, I have a feeling /dev/hda5 is your Linux / partition, but it clearly says it's Windows and formatted vfat. Your /boot can very well be /dev/hda6 but according to that fstab, it's /dev/hda2. Because it would be logical to think they are as follows if Windows was installed first.
/dev/hda5 -->/
/dev/hda6 -->/boot
/dev/hda7 -->swap
You may need to re-install and make sure to point Anaconda to install to the second disc which should be /dev/hdb and install grub to /boot if you create a separate /boot partition, you don't have to, you can just create a / and swap partition and install grub to the / partition.
Does Windows boot up, if so, how big is drive C?.
 
Old 04-17-2007, 03:05 PM   #8
jackuret
LQ Newbie
 
Registered: May 2004
Location: hinsdale, Illinois
Distribution: whitebox 9
Posts: 8

Original Poster
Rep: Reputation: 0
move directory to another partitiion

Quote:
Originally Posted by Junior Hacker
According to your /etc/fstab, /boot is in hda2.
The only way you can have a 1024 cylinder issue with that operating system is if the bios is set to use "CHS" instead of "large" or "LBA". If the bios is a newer one (1999 to present), it should support LBA and will use that setting by default, if it is set to "Auto", it will use LBA, if LBA is supported.
Or the boot loader you are using is an older version of lilo, grub is the default boot loader in this distribution.
What is the exact problem you are having? Perhaps that information will yield better help.
++++++++++++++++++++++++++

Whoops, sorry!
fstab is exactly as created by the system except that
the hda2 entry is one I put in by hand in hopes that it would affect the boot-up process.

I've checked the bios, and all the entries are either
LPA or auto.

When I get home,this evening, (its my home computer with the problem), I'll post the fdisk output for
hda and hdc (the second disk).

More history: I had been successfully double-booting (using grub for linux)and Windows 98 SE, until I had a disk failure in January, about the time I was switching over to Windows XP(home). The disk failure appeared to be in the mbr of disk 1. My vendor copied the windows stuff off of disk 1, switched the disk connections, and installed windows xp on the old disk 2. The hda drives (except hda2) are essentially
the same as before the switch.

I've been unable to boot windows, except in repair mode, ever since.
 
Old 04-17-2007, 10:26 PM   #9
jackuret
LQ Newbie
 
Registered: May 2004
Location: hinsdale, Illinois
Distribution: whitebox 9
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jackuret
++++++++++++++++++++++++++

Whoops, sorry!
fstab is exactly as created by the system except that
the hda2 entry is one I put in by hand in hopes that it would affect the boot-up process.

I've checked the bios, and all the entries are either
LPA or auto.

When I get home,this evening, (its my home computer with the problem), I'll post the fdisk output for
hda and hdc (the second disk).

More history: I had been successfully double-booting (using grub for linux)and Windows 98 SE, until I had a disk failure in January, about the time I was switching over to Windows XP(home). The disk failure appeared to be in the mbr of disk 1. My vendor copied the windows stuff off of disk 1, switched the disk connections, and installed windows xp on the old disk 2. The hda drives (except hda2) are essentially
the same as before the switch.

I've been unable to boot windows, except in repair mode, ever since.
Hi-
Here's my output from /sbin/fdisk /dev/hda:
fidsk:
Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1003 8056566 7 HPFS/NTFS
/dev/hda2 1004 1016 104422+ 93 Amoeba
/dev/hda3 1017 2434 11390085 f W95 Ext'd (LBA)
/dev/hda5 1017 1183 1341396 b W95 FAT32
/dev/hda6 * 1200 1271 578308+ 83 Linux
/dev/hda7 1272 2418 9213246 83 Linux

_______________________________________________
 
Old 04-18-2007, 01:23 AM   #10
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Well pardon my french, but I think you really screwed up you /etc/fstab.
Below is what your "Label" should be, I noticed you posted it with your /etc/fstab but you have it separate:
Code:
LABEL=/                 /                       ext3    defaults        1 1
/dev/hda7 is not a swap partition, I'm guessing it's your home partition based on it's size, you do not have a swap partition whose identifier is 82. Linux can run without a swap but not recommended. I can't tell you what the /home line should look like because I don't have any separate /home partition on this computer, my older one has one but it won't be accessible for quite some time.

/dev/hda2 is not a /boot partition, your /boot is part of the / at /dev/hda6, and I don't know what the entry for /dev/hda2 should look like in /etc/fstab, chances are if your not going to include this computer in a Amoeba setup, you can probably do without it in /etc/fstab.
I would recommend one of two options, rewrite you're /etc/fstab the way it was after the installation and put the Scientific Linux 1st install disc in the drive and attempt to re-install grub. You will have to refer to Scientific Linux on-line documentation or google to find the proper procedure . Or start over and re-install, because with /etc/fstab the way it is, your sure to have problems.
 
Old 04-18-2007, 01:44 AM   #11
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Also, again, there is no second disk. Maybe the missing partitions are on it but there is a connection problem, maybe jumpers not correct or something. But definitely only have one disk working. But I have a feeling there are no Linux partitions on it, except possibly swap as your /boot is probably in / because you posted the correct Label entry before /etc/fstab.
 
Old 04-18-2007, 01:57 AM   #12
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 59
Sorry

Based on the size, /dev/hda6 is a /boot partition and /dev/hda7 is the / partition, so the Label should be more like the one you had in your /etc/fstab. Actually, from examples I see on-line you should have both those Label lines.

http://www.justlinux.com/nhf/Filesys...rmanently.html

Last edited by Junior Hacker; 04-18-2007 at 02:06 AM.
 
Old 04-18-2007, 07:39 PM   #13
jackuret
LQ Newbie
 
Registered: May 2004
Location: hinsdale, Illinois
Distribution: whitebox 9
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Junior Hacker
Well pardon my french, but I think you really screwed up you /etc/fstab.
Below is what your "Label" should be, I noticed you posted it with your /etc/fstab but you have it separate:
Code:
LABEL=/                 /                       ext3    defaults        1 1
/dev/hda7 is not a swap partition, I'm guessing it's your home partition based on it's size, you do not have a swap partition whose identifier is 82. Linux can run without a swap but not recommended. I can't tell you what the /home line should look like because I don't have any separate /home partition on this computer, my older one has one but it won't be accessible for quite some time.

/dev/hda2 is not a /boot partition, your /boot is part of the / at /dev/hda6, and I don't know what the entry for /dev/hda2 should look like in /etc/fstab, chances are if your not going to include this computer in a Amoeba setup, you can probably do without it in /etc/fstab.
I would recommend one of two options, rewrite you're /etc/fstab the way it was after the installation and put the Scientific Linux 1st install disc in the drive and attempt to re-install grub. You will have to refer to Scientific Linux on-line documentation or google to find the proper procedure . Or start over and re-install, because with /etc/fstab the way it is, your sure to have problems.
_________________________________

Thanks. I'm slightly conversant in French. If the LABEL lines are screwed up, blame the creators of Scientific Linux (essentially RH Ver 4), I only added the hda2 line to what the installation did.
My immediate problem is to write files to a partition. I've changed the flile system of hda2 to ext3, and the palan is to put the /boot directory there in case the bios is not really using LBA.
If I'm in hda6, wherein /boot resides, would
dd if=/boot of=/dev/hda2/boot files=1
do the trick (all in in linux recue mode) do the trick? This would be followed by grub-install to the
/boot directory, after deleting the old one.
Regards,
 
Old 04-22-2007, 12:16 AM   #14
jackuret
LQ Newbie
 
Registered: May 2004
Location: hinsdale, Illinois
Distribution: whitebox 9
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jackuret
_________________________________

Thanks. I'm slightly conversant in French. If the LABEL lines are screwed up, blame the creators of Scientific Linux (essentially RH Ver 4), I only added the hda2 line to what the installation did.
My immediate problem is to write files to a partition. I've changed the flile system of hda2 to ext3, and the palan is to put the /boot directory there in case the bios is not really using LBA.
If I'm in hda6, wherein /boot resides, would
dd if=/boot of=/dev/hda2/boot files=1
do the trick (all in in linux recue mode) do the trick? This would be followed by grub-install to the
/boot directory, after deleting the old one.
Regards,
Hi again-
One of my colleagues had the answer to my original question. Here's what I learned:

Problem: I want to move the boot directory, presently in hda8 into hda2. Hda2 is not mounted at this time.

1. Provide a mount point for hda2. In some convenient directory, call it /mnt,mkdir a directory that will be the mount point. Example: mkdir /mnt/pnt2
2. Mount the target partition, like so:
mount /dev/hda2 /mnt/pnt2
3. (this step may be unnecessary: provide a receiving
directory for the files you want to transfer:
mkdir /mnt/pnt2/boot
4. Copy the files to the new directory
cp -r /boot /mnt/pnt2/boot
The -r (recursive) will include all the present /boot subdirectories in the transfer. If you
now cd into the new boot directory and do df . (in RH), the response will show that you are in hda2.

Regards,
jackuret
 
  


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
how to move a directory ? graziano1968 Linux - General 6 11-29-2006 09:55 AM
can I move the /usr directory to another partition? walterbyrd Linux - Newbie 4 07-10-2005 07:24 PM
Move home directory iain.ross Linux - Newbie 6 01-01-2005 04:37 PM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 10:19 PM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 03:04 AM


All times are GMT -5. The time now is 11:46 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration