Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Two partion and filesystem questions.
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Jerrac
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2003
Posts: 111

PostPosted: Wed Apr 21, 2004 9:09 pm    Post subject: Two partion and filesystem questions. Reply with quote

First, is there a way to merge to partitions? For instance, I have hda9 set as my root partiton. I just created hda10. Is there a way to merge those so that my root has the extra 7 gigs from hda10? Both are etx3 filesystems.

Second, I want to be able to mount my windows ntfs and fat partitions so that I can read and write to them. This: https://forums.gentoo.org/viewtopic.php?t=29285 topic has me recompiling my kernel. Since I am quite new to linux I would rather not do that. Plus I don't want to take the time. Is there a way to do it without compiling the kernel?
_________________
Soar with God!
David
Back to top
View user's profile Send private message
Vulpes_Vulpes
Apprentice
Apprentice


Joined: 10 Dec 2003
Posts: 264
Location: Amsterdam

PostPosted: Wed Apr 21, 2004 9:34 pm    Post subject: Reply with quote

I think you will just have to take the dive! What kernel are you using? I think you can do it with just a bit of help fo us. :) Trust me, in the end you will feel great! 8)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54421
Location: 56N 3W

PostPosted: Wed Apr 21, 2004 9:35 pm    Post subject: Reply with quote

Jerrac,

Provided you use modules, you only need to reconfigure your kernel to add the required modules then do
Code:
make modules
make modules_install

The modules will be loaded when you mount a filesystem that requires them.

vfat write support (for FAT32 and Fat 16) is mature and stable. Write support for NTFS is very limited. Last time I looked, it could only support overwriting exisiting files with a new file the same size as the old one.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
YopWongSapn
l33t
l33t


Joined: 26 Jan 2004
Posts: 627

PostPosted: Wed Apr 21, 2004 9:40 pm    Post subject: Reply with quote

I will answer your second question first. You need to compile ntfs or fat32 support (depending on the partition types) into the kernel before linux can read your windows partition. There are plenty of articles/how-tos out there to walk you through this.

As far as merging partitions goes, I'm not aware of any methods for doing this, but I'm sure there is one out there. I would recommend this instead:
Copy one of your larger folders in the / directory to hda10 (we'll use /usr in this example)
Code:
# mkdir /mnt/hda10
# mount /dev/hda10 /mnt/hda10
# cp -Rp /usr/* /mnt/hda10

Then edit /etc/fstab by adding a line like this:
Code:
/dev/hda10     /usr    ext3    noatime    0 0

***Note: make sure you use the -Rp flag when you copy to the new partition. This will retain permissions of all the files.

When you reboot, linux will mount /usr off of hda10.
_________________
Gentoo...it's like wiping your ass with silk. Or sandpaper.
Back to top
View user's profile Send private message
Jerrac
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2003
Posts: 111

PostPosted: Thu Apr 22, 2004 12:45 am    Post subject: Reply with quote

Ok, I copied my usr over to hda10, set the fstab, restarted, and now it isn't working right.

As it boots it keeps saying to run /sbin/depscan.sh. And then once or twice it asked if I wanted to run what I assume is linuxes scandisk. I said no because it said it could cause damage to a mounted filesystem. That is just the boot part.

It won't boot into gnome anymore. I just gives me the login. I can login and run from the command line, but it won't let me startx unless I am in root. Then it won't run most programs.

I did comment out the line in fstab for the hda10 partition. Didn't help.

Any suggestions?
_________________
Soar with God!
David
Back to top
View user's profile Send private message
YopWongSapn
l33t
l33t


Joined: 26 Jan 2004
Posts: 627

PostPosted: Thu Apr 22, 2004 3:58 pm    Post subject: Reply with quote

Did you copy the entire /usr folder to hda10, or just its contents? Boot off of the gentoo cd and chroot into your system (make sure to mount hda10 as /mnt/gentoo/usr).
Code:
# ls /usr


If you get a directory called usr inside /usr after you chroot, that's why you're having problems. The trick to this method is to copy only the contents of /usr to hda10, not the whole folder. If this is the case, here's how to fix it:
Code:
# cp -Rp /usr/usr/* /usr
# rm -r /usr/usr

I recommend waiting to delete the /usr/usr directory until you know everything has been copied from /usr/usr to /usr. After you get it all copied over, you should be able to reboot without any problems. Also, make sure you uncomment the hda10 line in your fstab.
_________________
Gentoo...it's like wiping your ass with silk. Or sandpaper.
Back to top
View user's profile Send private message
Jerrac
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2003
Posts: 111

PostPosted: Thu Apr 22, 2004 4:59 pm    Post subject: Reply with quote

Well, I checked, and everything was copied over correctly. No /usr/usr.

Could it be that some files were corrupted when I copied them?

Would it work to just delete hda10 and then resize hda9 to include that space? How would I do that?
_________________
Soar with God!
David
Back to top
View user's profile Send private message
vonhelmet
l33t
l33t


Joined: 06 Apr 2004
Posts: 770
Location: Somewhere in a school

PostPosted: Thu Apr 22, 2004 5:15 pm    Post subject: Reply with quote

Jerrac wrote:
Well, I checked, and everything was copied over correctly. No /usr/usr.

Could it be that some files were corrupted when I copied them?

Would it work to just delete hda10 and then resize hda9 to include that space? How would I do that?


Try copying everything back and changing your fstab back... that way you can find out if the files are corrupted or if you're screwed.
Back to top
View user's profile Send private message
YopWongSapn
l33t
l33t


Joined: 26 Jan 2004
Posts: 627

PostPosted: Thu Apr 22, 2004 5:15 pm    Post subject: Reply with quote

Jerrac wrote:
Could it be that some files were corrupted when I copied them?

Would it work to just delete hda10 and then resize hda9 to include that space? How would I do that?


It's not likely that the files were corrupted, but entirely possible. Resizing hda9 is also a possibility. You could get yourself the partition magic boot disks, which make resizing partitions super easy. There is a way to resize partitions using fdsik, but since I have partition magic I have never had the need. I'm sure it's in the forums somewhere.
_________________
Gentoo...it's like wiping your ass with silk. Or sandpaper.
Back to top
View user's profile Send private message
YopWongSapn
l33t
l33t


Joined: 26 Jan 2004
Posts: 627

PostPosted: Thu Apr 22, 2004 5:16 pm    Post subject: Reply with quote

vonhelmet wrote:

Try copying everything back and changing your fstab back... that way you can find out if the files are corrupted or if you're screwed.


Unless you actually deleted the original files from hda9, I wouldn't worry about that.
_________________
Gentoo...it's like wiping your ass with silk. Or sandpaper.
Back to top
View user's profile Send private message
Jerrac
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2003
Posts: 111

PostPosted: Thu Apr 22, 2004 6:09 pm    Post subject: Reply with quote

Well, if it is corrupted files then it corrupted both /usr directories. I did try changing my fstab back.

I just tried copying the usr files from hda9 over to hda10 again using the livecd. I mounted hda10 to a mount point I set up for one of my windows partitons. Then I did this and it gave me an error message:
Code:
livecd / #cp -Rp /usr/* /mnt/win_c
i8253 count too high! resetting..


I had chrooted to /mnt/gentoo.
_________________
Soar with God!
David
Back to top
View user's profile Send private message
YopWongSapn
l33t
l33t


Joined: 26 Jan 2004
Posts: 627

PostPosted: Thu Apr 22, 2004 6:17 pm    Post subject: Reply with quote

That's a really wierd error message. As I recall, i8253 is PCMCIA-related, so (assuming hda10 is a standard ide drive) this shouldn't really pertain to copying /usr/*. Mind if I ask what hardware you have going?

If you can no longer boot after changing fstab back, I would guess that something is in fact corrupted. This could be the result of a flaky hard drive, among other things. Try running fsck on hda10 (and 9 for that matter).
My guess is at this point your system may be pretty well hosed, although I'm quite clueless as to why. There still may be hope yet, though.
_________________
Gentoo...it's like wiping your ass with silk. Or sandpaper.
Back to top
View user's profile Send private message
Jerrac
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2003
Posts: 111

PostPosted: Thu Apr 22, 2004 6:27 pm    Post subject: Reply with quote

I am using a Sony Vaio FRV37 notebook. Full (or at least almost full) specifications here.

I also have a wireless network pc card. But I beleive that I had it out when I was copying.

I ran e2fsck on both hda9 and 10 before I copied. Is there a differece between e2fsck and fsck?
_________________
Soar with God!
David


Last edited by Jerrac on Thu Apr 22, 2004 6:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jerrac
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2003
Posts: 111

PostPosted: Thu Apr 22, 2004 6:28 pm    Post subject: Reply with quote

oh, and isn't there an repair option for emerge? Couldn't I try that to get it working again?
_________________
Soar with God!
David
Back to top
View user's profile Send private message
YopWongSapn
l33t
l33t


Joined: 26 Jan 2004
Posts: 627

PostPosted: Thu Apr 22, 2004 6:32 pm    Post subject: Reply with quote

Jerrac wrote:
I ran e2fsck on both hda9 and 10 before I copied. Is there a differece between e2fsck and fsck?

No, there really isn't much of a difference between the two.


Jerrac wrote:
oh, and isn't there an repair option for emerge? Couldn't I try that to get it working again?

There is, but I'm really not sure what you would try to repair. The /usr directory contains the whole gambit of items such as libraries, kernel sources, executables, etc., which is why it is so large. You could try running emerge -D world, which would recompile/reinstall all of your packages (including system), but that may lead to an even bigger headache than the one you're dealing with now.
_________________
Gentoo...it's like wiping your ass with silk. Or sandpaper.
Back to top
View user's profile Send private message
YopWongSapn
l33t
l33t


Joined: 26 Jan 2004
Posts: 627

PostPosted: Thu Apr 22, 2004 6:34 pm    Post subject: Reply with quote

New thought.....when you got that error while copying, did it finish copying /usr to hda10? If so, you could try editing your fstab to mount hda10 as /usr again...might work this time.
_________________
Gentoo...it's like wiping your ass with silk. Or sandpaper.
Back to top
View user's profile Send private message
Nate_S
Guru
Guru


Joined: 18 Mar 2004
Posts: 414

PostPosted: Thu Apr 22, 2004 6:42 pm    Post subject: Reply with quote

I highly recommend not using partition magic. Partition magic, last time I checked, had no support for doing anything with reiserfs, and very limited support for ext2/3. I've also heard horror stories of it corrupting data on ext2/3 partitions. It's perfectly good for windows drives (best I've found for ntfs, in fact,) but it is not so good on linux fs. GNU Parted can do what you want and is easy enough to use once you get the hang of it, and it even has full reiserfs support. And, it's free and in portage.

If one of your partitions is empty the best thing to do to merge them would be to delete one of them and then extend the other one. Delete the one that comes second on the drive if you can, as it makes things easier.

I believe the reason copying your /usr directory didn't work was that all your symlinks got nuked. I highly doubt you have any data corruption. You just have to use the -d flag to preserve links, or better yet just use cp -a, a synonym for all of them just for this purpose. Take a look at man cp. The only thing this will not do AFAIK is copy hidden files in the directory root (an error on bash's part, not cp's,) but you shouldn't have to worry about this because there shouldn't be any hidden files in the root of /usr (unless you've created them.)

Hope that helps,
Nate
Back to top
View user's profile Send private message
Jerrac
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2003
Posts: 111

PostPosted: Thu Apr 22, 2004 6:52 pm    Post subject: Reply with quote

Heh, I just tried to start my wireless card and it said that some file in /var didn't exist... So I would say that my gentoo is broken. Wish I knew what happened....
_________________
Soar with God!
David
Back to top
View user's profile Send private message
Nate_S
Guru
Guru


Joined: 18 Mar 2004
Posts: 414

PostPosted: Thu Apr 22, 2004 7:45 pm    Post subject: Reply with quote

I see I was late in posting...

Copying your broken-symlink directory back over the old one may have made it permanent, so a reinstall would be about all I can think of at this point. On the bright side, you can now set up your partitions exactly like you want them.

As well as backing up data, I highly recommend you tar up your whole /etc directory, just for refrence, when you install again, if you do indeed need to.

-Nate
Back to top
View user's profile Send private message
Jerrac
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2003
Posts: 111

PostPosted: Thu Apr 22, 2004 9:19 pm    Post subject: Reply with quote

Heh, well, miracles happen. I tried booting again and it worked just fine.... I wonder if my problems had something to do with the fact that my entire partiton was used up. I had tried to emerge openoffice. Apparently it needs several gigs to do that.

So I need to just resize my hda9 partition. :D *goes off to search for partiton managers*
_________________
Soar with God!
David
Back to top
View user's profile Send private message
YopWongSapn
l33t
l33t


Joined: 26 Jan 2004
Posts: 627

PostPosted: Thu Apr 22, 2004 9:25 pm    Post subject: Reply with quote

Jerrac wrote:
I had tried to emerge openoffice. Apparently it needs several gigs to do that.



Yeah, OpenOffice is huge :D
Good to hear you got it back in working order.
_________________
Gentoo...it's like wiping your ass with silk. Or sandpaper.
Back to top
View user's profile Send private message
Nate_S
Guru
Guru


Joined: 18 Mar 2004
Posts: 414

PostPosted: Fri Apr 23, 2004 2:21 pm    Post subject: Reply with quote

Quote:
So I need to just resize my hda9 partition. *goes off to search for partiton managers*


Parted. Trust me, it's not the easiest to learn, but worth the extra effort.

You can find it in portage, or the online manual is here
http://www.gnu.org/software/parted/manual/html_mono/parted.html

Good luck,
Nate
Back to top
View user's profile Send private message
Jerrac
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2003
Posts: 111

PostPosted: Fri Apr 23, 2004 3:37 pm    Post subject: Reply with quote

Well, I tried partgui, and I think that adding hda10 to hda9 isn't going to work. It is actually situated right before hda6 on the hard disk.... So I will have have to try copying usr over again sometime.
_________________
Soar with God!
David
Back to top
View user's profile Send private message
Jerrac
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jun 2003
Posts: 111

PostPosted: Fri Apr 23, 2004 3:39 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Jerrac,

Provided you use modules, you only need to reconfigure your kernel to add the required modules then do
Code:
make modules
make modules_install

The modules will be loaded when you mount a filesystem that requires them.

vfat write support (for FAT32 and Fat 16) is mature and stable. Write support for NTFS is very limited. Last time I looked, it could only support overwriting exisiting files with a new file the same size as the old one.

So I just type in those commands? I don't have to specify any specific modules?

Sounds like it is a good thing I made two of my windows partitons fat32... :D
_________________
Soar with God!
David
Back to top
View user's profile Send private message
YopWongSapn
l33t
l33t


Joined: 26 Jan 2004
Posts: 627

PostPosted: Fri Apr 23, 2004 5:53 pm    Post subject: Reply with quote

Jerrac wrote:
So I just type in those commands? I don't have to specify any specific modules?


Well, you need to specify the modules in your kernel configuration. If you're looking for the simplest way to do this, compile vfat support directly into the kernel, that way you won't need to
Code:
make modules modules_install
and then specify the module when you want to use it. Which ever way you choose, it's a good idea to build the modules every time if you in fact have any selected.
_________________
Gentoo...it's like wiping your ass with silk. Or sandpaper.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum