LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-07-2003, 06:15 PM   #1
Dergro
LQ Newbie
 
Registered: Aug 2003
Location: Montreal, Canada
Distribution: NetBSD
Posts: 12

Rep: Reputation: 0
root partition shows wrong total size


Well this is what happened, I wanted to move my old root partition to a new bigger one. The old one was 12gb and then new one is 25.
So I did that with a:
cp -avx / /mnt/newroot

Alright when that was done i edited my fstab and grub.conf to boot the new partition as /. Restarted, everything booted fine. I did a df -h to check the size and it still showed only 12gb for the new partition. I mounted it back on /mnt/newroot and did another df -h.
Heres the output:

Filesystem Size Used Avail Use% Mounted on
/dev/hda1 12G 9.5G 1.9G 84% /
none 378M 0 378M 0% /dev/shm
/dev/hda1 25G 13G 12G 53% /mnt/newroot

Heres my output from fdisk:

Disk /dev/hda: 40.0 GB, 40037760000 bytes
255 heads, 63 sectors/track, 4867 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 3185 25583481 83 Linux
/dev/hda2 3186 3200 120487+ 83 Linux
/dev/hda3 3201 4672 11823840 83 Linux
/dev/hda4 4673 4867 1566337+ f Win95 Ext'd (LBA)
/dev/hda5 4673 4867 1566306 82 Linux swap

note: hda1 is the new / and hda3 is the old one (I plan on formatting hda3 and using it as /home btw)

also strangely when I have /dev/hda3 mounted the space changed when I add files to /dev/hda1.

I made a copy of my /home folder (as a test) heres the space before:
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 12G 9.5G 1.9G 84% /
none 378M 0 378M 0% /dev/shm
/dev/hda3 12G 9.5G 1.9G 84% /mnt/root

and heres after:
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 12G 9.8G 1.6G 87% /
none 378M 0 378M 0% /dev/shm
/dev/hda3 12G 9.8G 1.6G 87% /mnt/root

Basically, what can I do to get things working properly again? I'm using gentoo btw. Hope you guys can help
 
Old 10-07-2003, 08:03 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
never seen that before but let's try mounting /dev/hda3 somewhere and creating a file on it.

then see if the file is in /


see what this says

cat /proc/mounts

Last edited by DavidPhillips; 10-07-2003 at 08:06 PM.
 
Old 10-07-2003, 08:15 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Just out of curiosity: how do you share
/dev/hda between two hard drives?

Cheers,
Tink
 
Old 10-07-2003, 08:22 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I would say that grub has done something strange here.
 
Old 10-07-2003, 08:23 PM   #5
Dergro
LQ Newbie
 
Registered: Aug 2003
Location: Montreal, Canada
Distribution: NetBSD
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by DavidPhillips
never seen that before but let's try mounting /dev/hda3 somewhere and creating a file on it.

then see if the file is in /


see what this says

cat /proc/mounts
Hmm I created a directory on hda3 and it did show on /

and heres my /proc/mounts

rootfs / rootfs rw 0 0
/dev/root / reiserfs rw,noatime 0 0
none /dev devfs rw 0 0
none /proc proc rw 0 0
none /dev/shm tmpfs rw 0 0
/dev/hda3 /mnt/root reiserfs rw,noatime 0 0
 
Old 10-07-2003, 08:51 PM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
post grub.conf and fstab

one of them has the problem


I would guess it's grub.conf that has root(hd0,2) or something like that

which is hda3

hd0,0 is hda1

Last edited by DavidPhillips; 10-07-2003 at 08:54 PM.
 
Old 10-07-2003, 09:06 PM   #7
Dergro
LQ Newbie
 
Registered: Aug 2003
Location: Montreal, Canada
Distribution: NetBSD
Posts: 12

Original Poster
Rep: Reputation: 0
here you go

fstab:

# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.13 2003/07/17 19:55:18 azarah Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.

# <fs> <mountpoint> <type> <opts> <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda2 /boot ext3 noauto,noatime 1 1
/dev/hda1 / reiserfs noatime 0 0
/dev/hda5 none swap sw 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,ro 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:

none /dev/shm tmpfs defaults 0 0



grub.conf:

default 0
timeout 15
splashimage=(hd0,1)/boot/grub/splash.xpm.gz

title=Gentoo Linux
root (hd0,1)
kernel (hd0,1)/boot/bzImage root=/dev/hda1 hdc=ide-scsi hdd=ide-scsi video=vesa:ywrap,mtrr vga=0x31A
initrd=/boot/initrd-1280x1024

title=Gentoo Linux - Old
root (hd0,1)
kernel (hd0,0)/boot/bzImage.old root=/dev/hda1 "hdc=ide-scsi"

Last edited by Dergro; 10-07-2003 at 09:08 PM.
 
Old 10-07-2003, 09:18 PM   #8
Scarface
Member
 
Registered: Oct 2003
Location: Montreal
Distribution: Gentoo 1.4, Slackware 9.1
Posts: 41

Rep: Reputation: 15
that is some complecated stuff dergro, i can't help u
 
Old 10-07-2003, 10:11 PM   #9
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
did you fix the grub.conf and fstab on the right partition?

may seem crazy, but I had to ask
 
Old 10-08-2003, 06:26 AM   #10
Dergro
LQ Newbie
 
Registered: Aug 2003
Location: Montreal, Canada
Distribution: NetBSD
Posts: 12

Original Poster
Rep: Reputation: 0
Yeah grub.conf and fstab are on the right partition. Hmm maybe this will help http://forums.gentoo.org/viewtopic.p...947&highlight=
I don't think grub is using the new edited config file. When I rebooted this morning grub still shows Windows XP which i deleted a few days ago and removed from grub.conf. I have a feeling that grub is still using root=/devhda3
 
Old 10-08-2003, 07:05 AM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
mount /dev/hda1 and search it to see how many grub.conf files there are and make sure they are all links to one file on that partition.
also check the current root for other grub.conf files, that's the ones it will use on install. Then run..

grub-install --recheck /dev/hda


also check menu.lst, on mine it is a link to grub.conf

Last edited by DavidPhillips; 10-08-2003 at 07:21 AM.
 
Old 10-08-2003, 07:22 AM   #12
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Lilo rocks
 
Old 10-08-2003, 12:49 PM   #13
Dergro
LQ Newbie
 
Registered: Aug 2003
Location: Montreal, Canada
Distribution: NetBSD
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by DavidPhillips
mount /dev/hda1 and search it to see how many grub.conf files there are and make sure they are all links to one file on that partition.
also check the current root for other grub.conf files, that's the ones it will use on install. Then run..

grub-install --recheck /dev/hda


also check menu.lst, on mine it is a link to grub.conf
Well I'm at school righ tnow I'll check as soon as I get home. Hope this works, and thats for all your help
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Added second harddrive as a partition, but now the partition size is wrong.. mlsbraves Linux - General 5 08-17-2005 08:10 PM
Wrong partition size indicated thepoint Linux - Hardware 3 08-02-2005 10:14 PM
Restored backup, now new root partition reporting wrong size. wackman Linux - Software 6 05-28-2005 02:24 AM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
root partition shows 100% full in RH 7.2 dmcmurray5 Red Hat 2 05-18-2004 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:43 PM.

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
Open Source Consulting | Domain Registration