LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-28-2004, 01:07 AM   #1
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
changing partitions filesystems and mounting them?


My uncle set up my partitions when he installed linux on my computer. He made a windows partition incase i wanted to install windows on my computer again and another linux partition. I want to know if i can change the windows partiton filesystem to ext3 and mount it along with the other linux partition. I have a 60 gig drive but i keep running out of space with Fedora Core 2 cuz the partition is small
 
Old 12-28-2004, 01:26 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Sure. I'm not sure if you have to change the id with fdisk or not, but it couldn't hurt (I do). Then just mkfs.
 
Old 12-28-2004, 04:46 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yep, what he said. use fdisk or cfdisk to change the partition type to type 83 (Linux type) in order to keep things correct and avoid some possible glitches later. and then use mkreisferfs /dev/hda1 (or wherever the partition is) and that's it. just add an entry to /etc/fstab to have it boot automatically.

if you want to actaully migrate your /home onto that partition, it's pretty straight forward. just have a search around here and ask back if you get stuck. it makes sense to do something like this, unless you really are happy having an arbitrary /var/my_files partition or something
 
Old 12-28-2004, 07:00 AM   #4
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
i used fdisk to change the id's of the windows partitions. The man for mkfs says i need to specify the number of blocks for the ffilesystem. I don't know the lhow many blocks are in the partition. How would i find that out? Also when i go to edit the fstab would the first column just be /dev/hda(number of partition?) One parition is an extended parition. Do i need to make an entry for just that partition or additional one for each sub partition? Also i got this message after changing the ids:

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

im not too sre what it means and if i should be concerned with it or not.

Last edited by dr_zayus69; 12-28-2004 at 07:23 AM.
 
Old 12-28-2004, 12:30 PM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Well, the blocks should default if you don't specify. And 'mkfs' is pretty generic - you need a specific type or call it as 'mkfs.ext3'. Unforunately, I use reiser - so, like acid_kewpie said, mkreiserfs covers it. AFAIR, mkfs is the same, but I don't make many ext2/3 systems.

Yep, column 1 is /dev/hdXN. If you had an extended partition on, say, hda4, then that wouldn't actually get addressed. The logical volumes in the extended partition are what you need there - your hda5 and hda6 and so on.

As far as your error message, fdisk does spit out some warnings that sound very serious but aren't. However, I'm not sure about that one. Failing to re-read the table is no big deal, but that one may be different from the usual. Post up fstab, output of 'fdisk -l', and so on. It may be okay, but I dunno.

And just to make sure, this is purely mounting another data dir somewhere under your root fs, right? You're not actually rearranging the system in general?
 
Old 12-28-2004, 01:04 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,691

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
An extended partition is a just a container for the logical partitions. It can not be mounted. In your case since all you changed was the partition ID you shouldn't have to reboot.
 
Old 12-28-2004, 06:49 PM   #7
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
And just to make sure, this is purely mounting another data dir somewhere under your root fs, right? You're not actually rearranging the system in general?

I'm not trying to rerange the system. I'd just be happy if i could mount the partitions and use them as another folder to store files in for extra space. The most i might do is migrate the home directory to a bigger partition like acid mentioned. I know that the bios can usually only handly the first 1024 cyclinders, but hda1 starts at cyclinder one. So i don't know if i should mess with that partition to much and end up not being able to boot up. Unfornately hda1 is the largest partition and a FAT32 partition at the moment. My uncle set up the system and i have never installed linux or any OS before so i don't want to try on this hdd and mess everything up without knowing what i am doing first. My friend is going to let me borrow a spare hdd to practice on and when i get comfortable doing it i will rehaul this hdd but until then i am trying to get some more space.

here is the output of fdisk. and by the looks of it it looks like i was unsuccessful at changing hda1+2 id to 83.

[root@x1-6-00-10-b5-f4-57-ac sbin]# ./fdisk -l

Disk /dev/hda: 60.0 GB, 60022480896 bytes
16 heads, 63 sectors/track, 116301 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 63945 32228248+ c W95 FAT32 (LBA)
/dev/hda2 63946 80205 8195040 c W95 FAT32 (LBA)
/dev/hda3 * 80206 104580 12285000 83 Linux
/dev/hda4 104581 116295 5904360 f W95 Ext'd (LBA)
/dev/hda5 104581 114735 5118088+ 83 Linux
/dev/hda6 114736 116295 786208+ 82 Linux swap

and fstab:


LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/hda6 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 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/sda1 /mnt/usb vfat umask=000


Last edited by dr_zayus69; 12-28-2004 at 06:54 PM.
 
Old 12-28-2004, 07:22 PM   #8
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
That there is a Windows box. That's what - 40 gigs for Windows? and your extended is 'f' instead of '5'. Still about 17 gigs for Linux, though. (Doesn't add up but I'm rounding.) I've been seeing that more and more lately - what's the purpose of the LABEL in fstab? (I should just RTFM, but I've never used it LABEL.)

hda3 is root and hda6 is swap, but where's hda5? That's about 5 gigs. And two Windows partitions. Huh.

Well, actually, FAT32 is a lame filesystem but you *could* store files on it and access them from Linux. Just have to pay attention to filenames and sacrifice the benefits of a Linux fs and put up with everything looking like an executable.

I'm not positive on this, but if fdisk fails to re-read the partition table, it's going to print the old one regardless. So just because it shows FAT doesn't mean that's what it'll be on reboot.

So which partition were you changing?

fdisk /dev/hda
t
1
83
t
2
83
w

If that doesn't work, I'd go ahead and *shudder* reboot and do another fdisk -l. If you have no data on the Windows partitions and you're not messing with Linux partitions, it shouldn't really screw anything up. I'd also see about getting hda5 into fstab.

This post comes without warranty, etc.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing filesystems Ephracis Linux - Software 1 11-04-2004 06:42 AM
Does FreeBSD support existing partitions and ext3 filesystems? GAVollink *BSD 6 01-21-2004 08:51 PM
filesystems & shared partitions bukowski Linux - Newbie 1 11-15-2003 12:44 PM
Question on filesystems and partitions TPupAZ Linux - Software 6 10-02-2003 11:47 PM
Mounting filesystems jimmmac Linux - Newbie 4 01-05-2003 06:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:08 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
Open Source Consulting | Domain Registration