Page 1 of 1

Ubuntu-Kubuntu- for really-dummies...FAT32 isn't working!

Posted: Mon May 09, 2005 9:11 am
by GoyoNeuff
Hello all,

Warning! This is write for a really newbie in the topic, I just thought that might help others that want to tray linux. So for those who are very knowledge about it, please receive my apologies, and make any comments as you want!

I have one important question: I cannot write anything from Kubuntu (linux) into the FAT32 HD partition. Sure I can from windows, but I need this working in order to share data between the two. PLESE HELP IN HERE!!!!

I decided that right after finishing graduate thesis, I'd partially migrate to Linux. Looking here and there for distros (for really newbies like me, this means that there're out there a bunch of Linux distributions) finally I chose Ubuntu, which seems to be the "easier" one. Moreover, I discovered Kubuntu, and after reading a little bit of both, and looking screenshoots of how they'd look like, I made up for Kubuntu. Here's the steeps I did so far. There're some tweeks that need to be done, but for now, this is working partially good.

1. Google and read information about Linux, distros, and possible difficulties you may have. Info about distros, partitions, kernels, etc...Learned a lot from others who made the change already.

2. I wanted to keep XP running (wife :shock: ), so it had to be a double-booting.

3. Defrag your HD before, this way I believe you can "reorganize" some space you may need in the future.

4. Make a complete back-up of all your files. Use RR IBM (rescue and recovery) utility or something else, like northon Ghost.

5. Get disk utilities as much as you can, e.i., Recovery Cd's from IBM (I ordered them a week after I received T42, just saying..." I bought a great Thinkpad T42, and I want my Recovery Cd's in case 'some day' I need them..."), boot and restart utilities, etc.

6. If you want to keep XP running and make space for Linux, you need to partition your HD (I'd call this 'having small HDs inside your main HD' :wink: ). Therefore, you might need a partition tool. I’d strongly suggest getting one: buy it, borrow it from a friend. Some of the free demos outside don’t work as you need. If you want only to have Linux, you don’t need to worry about partitioning before installing it, you can do it during its installation.

7. Since I want XP and dual-booting, I used Partition Commander to create various partitions. At this point, you might or might not want to keep the IBM_Predesktop area. I decided that since some of the very hard work has passed, and I’ve the recovery CDs, I want to have that HD space back. So, when using Partition Commander I delete this partition to get back the 4GB of HD space.

8. Now, partition is not a very difficult task, but it can get tricky! Programs like Partition Commander, Partition Magic, or Acronis Disk have a graphical interface (GUI) that helps a lot when you are a new, no experienced buddy in this. Basically what you need is to make space for your already windows running, and space for linux. That’s the whole deal. There is some important info here that one has to take into account. When installing a linux distro, you might have to install something called GRUB or LILO, which, as my little knowledge, are need it to boot into linux. Because IBM RR changes something in the MBR (master boot record) and you maybe want to keep using IBM RR, you might not want to install neither GRUB nor LILO in the MBR. Instead, you can create one small 50MB partition and make it boot-able, meaning that you can boot (‘start’) your OS (operation systems –windows and linux-) from there. This way you are also preventing to get screwed by the BIOS 1024 cylinder limit http://www.tldp.org/HOWTO/Large-Disk-HOWTO-4.html#ss4.2 As we said, you need space for both OS. Having windows running, you want to shrink it in your HD to a certain size to make space for linux. I leave it in 15GB. Now, you make more partitions for Linux and also, very important, one partition to share data between windows and linux. This is how my HD looks now, from the beginning of the HD to the end:

50MB for the bootable partition
15GB for windows
7GB for kubuntu
1GB for linux swap
rest GB for data share

That’s a total of 5 partitions. You can have primary and extended partitions. I read somewhere that would be better if you have all your partitions as primary. What I didn’t know was that you can only do 4 primary partitions in your HD (I truly don’t know why). So that was one problem for a while, but then I figured out that Linux can be in an extended partition, and that you can create extended partitions inside one primary partition. Also, it is important to know that windows and linux need a different format of the HD to function. Windows is currently working in NFTS (after you turn on our laptop, it converts from FAT32 to NFTS) and linux work in EXT2 or EXT3. You format each partition as you need, and to share data, you make that partition a FAT32, which windows and linux can see and work with. Therefore, I partition the HD this way

50 MB (hd0,1) bootable partition as primary
15 GB (hd0, 0) windows partition as primary (NFTS)
8 GB as primary partition
7 GB extended partition for linux (EXT 3)
1 GB extended partition for linux swap (EXT 3)
rest GB as primary partition for data share (FAT32)

When doing you partitioning, it’s very important to write down the numbers of your partitions, because latter on, when installing linux, and GRUB, you need to tell him that you want it in the 50MB bootable partition. In my case, I have the 50 MB as (hd0,1).

9. Reboot windows to check that everything is in order. Now, you might want to start with the kubuntu (linux) installation.

10. Make sure your BIOS is set to boot from CD. Insert the Kubuntu CD, and restart the machine. Follow the instructions, which are text-based, but really easy to follow. During the installation you will get to a section on partitioning. DO NOT repartition the whole drive, you'll lose your windows xp. Instead, follow the manual partitioning instructions to do the following:
a. Make the second (50MB) partition bootable, and set to mount as "/boot".
b. Set up the first extended partition as the linux partition and mount as “/”
c. The second extended partition as linux swap partition.
d. Mount the fifth partition as "/datashare" or something similar, and format as FAT32


10. Proceed with the installation as normal until you get to the GRUB part. _DO NOT INSTALL GRUB IN the MBR. When you say no, GRUB will request to be installed in a bootable partition. Luckily, you have one, the 50MB partition. Now you need those partition numbers. The GRUB installer uses some odd (for Windows users) codes to refer to them. In my case I used “(hd0,1)”. Continue with the rest of installation. It will eject the CD at one point and tell you that it will restart. The machine will boot into GRUB and will ask you to select the OS. Select Kubuntu, and it will finish the installation. At the end, you will have Kubuntu asking you about the username and password, and then you are in!!! Congrats!!!

11. Play a little bit if you want with Linux, then reboot and hopefully you will be prompt again after reboot, into GRUB, which will ask you if you want to go Kubuntu or Windows. Select Windows to check that everything is working. If you can get into windows and kubuntu, you are good, if not, there extra steps you might need.

12. If you need extra steps to set up to boot into XP by default, follow this link: http://www.geocities.com/epark/linux/gr ... HOWTO.html from step # 3.


As I’m working in Kubuntu, I’ll be updating. I’ve to test wireless, IBM buttons, etc.

Thank you all,

K.

Posted: Mon May 09, 2005 9:48 am
by wingman
So are you having problems writing to your fat32 drive? Please let us know, it is an easy fix :P

Posted: Mon May 09, 2005 3:49 pm
by GoyoNeuff
Seriously guys.... :P ...any help with the FAT32 problem? I can save from XP, but I cannot copy, or save from Linux.... :roll:

Thank you,

K.

Posted: Mon May 09, 2005 5:19 pm
by egibbs
How exactly are you mounting it?

Ed Gibbs

Posted: Mon May 09, 2005 5:26 pm
by GoyoNeuff
As "/datashare" when doing the manual partitioning in Kubuntu installation.

Thanks,

K.

Posted: Mon May 09, 2005 9:53 pm
by wingman
Open up a terminal, type:

sudo chmod 777 /datashare

If that does not work, please post your fstab file located in /etc/fstab

Thanks!

wingman

Posted: Tue May 10, 2005 7:20 am
by GoyoNeuff
Ok, thanks a bunch ! :shock:
I'll try that later, now I'm at work. If you would be kind to tell me what I'm doing with this command and with looking at my fstab... :wink:
THX,
K.

Posted: Tue May 10, 2005 7:31 am
by GoyoNeuff
OK, I think I got it.
Doiing sudo chmod 777/datashare I'm resetting its access to anyone can write to it, but question is...I'm the only user. So, I don't get it :?
K.

Posted: Tue May 10, 2005 8:02 am
by wingman
777 changes permissions to read and write for all users. Sorry, when I set up my "data swap" I just generally do a 777, 755 will also work for you. Just makes /datashare read/write accessable.
If the "chmod" command would not have worked, looking at /etc/fstab would have told us how the fat 32 share was being mounted and includes file permissions there as well. Hope this kinda clears things up :P
Here is a nice little tutorial, explaining chmod and it's uses: http://catcode.com/teachmod/

Let us know if we can answer any other questions!

Posted: Tue May 10, 2005 6:39 pm
by runixd
you don't actually ever need to have a directory 777, this is a bad practice for any directory, your directory should be 755, what might go wrong is either there is no directory /datashare or there no support for fat32, I don't really know how ubuntu does this, but do this:

1)ls /
if you don't see datashare
1a)sudo mkdir /datashare

then
2)sudo modprobe vfat

then
3)cat /etc/fstab | grep datashare
if you see a datashare entry do
3a)mount /datashare
that should be fine now
if not
3b)sudo mount /dev/hdaX /datashare
where hdaX is your fat32 partition
if there was no entry in fstab
3c)sudo echo "/dev/hdaX /datashare vfat defaults 0 0" >>/etc/fstab

Posted: Tue May 10, 2005 6:51 pm
by wingman
runixd
You are right, I am sorry, the correct command should be:
sudo chmod 775 /datashare
then you should be good to go. runixd is correct, it is bad pratice to make it 777. You can run the command on /datashare and it will be fine. Sorry for the confusion.

Posted: Tue May 24, 2005 5:28 pm
by GoyoNeuff
I had made many changes, but finally, I did a completely clean up installation, this time with Ubuntu instead of Kubuntu. This is the fstab file I am getting:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda5 / ext3 defaults,errors=remount-ro 0 1
/dev/hda2 /boot ext3 defaults 0 2
/dev/hda4 /datashare vfat defaults 0 0
/dev/hda6 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

Not luck at all. Any help here please????

K.

Posted: Wed May 25, 2005 3:37 pm
by runixd
line
/dev/hda4 /datashare vfat defaults 0 0

should read

/dev/hda4 /datashare vfat rw 0 0

Posted: Wed May 25, 2005 4:05 pm
by GoyoNeuff
Thank you,
I think in all the changes I did before, I did that one, but I'll try it again. I'll let you guys know if it works,
Thx,
K. :D

Posted: Wed May 25, 2005 5:39 pm
by GoyoNeuff
Still note working... :(

fstab is:


# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda5 / ext3 defaults,errors=remount-ro 0 1
/dev/hda2 /boot ext3 defaults 0 2
/dev/hda4 /datashare vfat rw 0 0
/dev/hda6 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0


HELP!!!

Posted: Thu May 26, 2005 2:37 am
by runixd
hmm, ok, this is one of those times when minor problem takes too long due to limited communication.

lets do a step-by-step, we'll be working with fstab for simplicity, if not try mount.

1) We need your user name and some group, assuming your username is bob, and group bob exists.

# id

2) Make make sure you belong to group bob as well, otherwise further use any other group you belong to. Next we need to edit your fstab. For this get rootshell.

# sudu su


3) now make sure you have fat is unmounted:

# umount /datashare

4) We will now detalize your fstab entry, edit your fstab and replace current line:

"/dev/hda4 /datashare vfat rw 0 0 "

with the following line:

"/dev/hda4 /datashare vfat users,exec,uid=bob,gid=bob,umas=002 0 0"

now save and close fstab, and exit root shell

#exit

with terminal still open, type:

#mount /datashare

report back.

Posted: Thu May 26, 2005 8:11 am
by GoyoNeuff
runixd,
Not luck. I did as you told. Issues:
1. ) Last nite I was learning and working this "minor problem" around. What is happening is that I can copy and move to /datashare using a terminal, but I've to do it as "sudo", otherwise it won't work.
2. ) After the changes I made in fstab, now I've to mount /datashare everytime I reboot. To mount I had to use sudo mount /dev/hdaX /datashare
because mount /datashare was giving me a very weird error.

As you can tell, I'm learning. I think problem is that it doesn't recongnize my username and it limits to write only as "root".

HELP!!! :wink:

Thank you,

K.

Posted: Thu May 26, 2005 9:50 am
by GoyoNeuff
It's working!!! :D
I found a mistake, it's umask=002 instead of umas=002. Now it mounts /datashare and also I can write to it without being "root" :D :D
Now, I wish you guys can explain me what I did, because so far, I understand part of it!!! :wink:
Thank you,
K.

Posted: Thu May 26, 2005 12:15 pm
by runixd
sorry, typo on my side,

what you did is added extra options:

users = can be mounted, unmounted by users, sets noexec
exec = overwrite noexec and make partition executable, dunno if you need it
uid=bob = files on partition owned by bob, since fat doesn't support unix permissions
gid=bob= files on partition belong to group bob, same as above

umask = 002 = this is a static bitmask, while mounting during boot may cause problems.


So basically, you made files being owned by you, statically, rather than by mounting process (default behaviour)

Posted: Thu May 26, 2005 2:06 pm
by GoyoNeuff
Thank you.
I was doing my hw. I got almost all of this. Still, why I would like to have the partition executable?.

Another tweak I cannot complete is using the thinkpad buttons. I have the tpb, and followed the forum we have here, but not luck.

thanks,

K.

Posted: Thu May 26, 2005 2:16 pm
by runixd
"exec = overwrite noexec and make partition executable, dunno if you need it " was my sentence, you might or might not need it, you either didn't specify or I didn't read what you need this partition for.

as for tpb:

apt-get install tpb
man tpb

I don't know if it is in ubuntu repository, it is in debian.

Posted: Tue May 31, 2005 7:43 am
by GoyoNeuff
Hi All,

1. Thinkpad buttons aren't working. I did all instructions posted but not luck :(
2. When booting, if the network cable is unplugged, it takes for ever to do it. I did guidelines explained here to solve this problem, but not luck.

Thank you,

K. :)

Posted: Tue May 31, 2005 9:52 am
by runixd
What thinkpad buttons? If you'r talking about tpb, you should have nvram either compiled into kernel or compiled as module and load it. Also, you should add yourself to group nvram, to have /dev/nvram access. Network can be configured with ifplugd, if you don't want to, just hit ctrl+c when you reach dhcp detection.

Posted: Tue May 31, 2005 11:30 am
by GoyoNeuff
I'm talking about, e.i., back and foward buttons.

I did try ifplugd:
INTERFACES="eth0"
HOTPLUG_INTERFACES="eth0"
ARGS=" -q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"

but it isn't working.

Thx,

K.