Re: trouble with fdisk and activate the swap

1999-09-04 Thread Brad
-BEGIN PGP SIGNED MESSAGE-

On Fri, 3 Sep 1999, Michael Konrad wrote:

 I always set up my swap partition as a primary partition and I don't
 have that problem. I can never read the blocks right, but it looks like
 the swap partition is more than 128MB. You can set up multiple swap
 partitions but they can not be more than 128MB.

The new style swap area (you need a recent kernel and mkswap. 2.2.x and
potato's are sufficient) can support much larger areas, depending on the
arch (sparc64 can use 3TB! i386 can use 2GB)


- -- 
  finger for PGP public key.

-BEGIN PGP SIGNATURE-
Version: 2.6.3ia
Charset: noconv

iQCVAwUBN9COiL7M/9WKZLW5AQEo6AP8DnY0zbsjAjifJ74EHxnC+LDoVL2XZejn
GMUWvdhUN+T/DGjYPUMG2ctfYbyXn5s/b9WmSNHVy9YjrnAx7d6XEOIWkHz93pfr
Wh5BxfFHJhwiszzjI0CEY4wVHgp8ndxzXiIhcf0yafXrkfHbYOX/XkYIHI+O3x/3
eanehR4WSEk=
=gdla
-END PGP SIGNATURE-


Re: trouble with fdisk and activate the swap

1999-09-03 Thread Michael Konrad
I always set up my swap partition as a primary partition and I don't
have that problem. I can never read the blocks right, but it looks like
the swap partition is more than 128MB. You can set up multiple swap
partitions but they can not be more than 128MB.

-Michael


Michael Konrad  Computer Consultant
[EMAIL PROTECTED]College of Visual and Performing Arts
Syracuse University 315-443-9367





 Andrei Ivanov [EMAIL PROTECTED] 08/25/99 09:58PM 
 
  Device Boot   Start  End   Blocks   Id  System
  /dev/hda1   *1 4063  2047720+  83  Linux native
  /dev/hda2 4064 8127  2048256   83  Linux native
  /dev/hda3 8128 8400   137592   82  Linux swap

Wrong. You created Swap as a primary partition, but it has to be
logical.
(/dev/hda4 it will be)

   Syncing disks.
   Re-read table failed with error 16: Device or resource busy.
   Reboot your system to ensure the partition table is updated.
   My first question: why is it happening? Do I have to reboot??

This is ok. You have to reboot to update the partition table, but dont
change the fstab file yet (you can, though)
Once you boot it up, do mkswap /dev/hda4
Then swapon

Andrew

---
 Andrei S. Ivanov  
 [EMAIL PROTECTED] 
 [EMAIL PROTECTED] 
 UIN 12402354  
 http://scorpio.myip.org--All the pages bundled together.
---


-- 
Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]
 /dev/null


Re: trouble with fdisk and activate the swap

1999-08-27 Thread Brad
-BEGIN PGP SIGNED MESSAGE-

On Wed, 25 Aug 1999, Andrei Ivanov wrote:

  
 Device Boot   Start  End   Blocks   Id  System
 /dev/hda1   *1 4063  2047720+  83  Linux native
 /dev/hda2 4064 8127  2048256   83  Linux native
 /dev/hda3 8128 8400   137592   82  Linux swap
 
 Wrong. You created Swap as a primary partition, but it has to be logical.
 (/dev/hda4 it will be)

No, this is wrong. A swap partition can be either primary or logical,
Linux doesn't care. Also, if swap was a logical partition it would be
/dev/hda5, not hda4 (hda4 could possibly be the extended partition
containing all logical partitions.)

  Syncing disks.
  Re-read table failed with error 16: Device or resource busy.
  Reboot your system to ensure the partition table is updated.
  My first question: why is it happening? Do I have to reboot??

AFAIK, this is normal. Go ahead and reboot, but see below first.

 This is ok. You have to reboot to update the partition table, but dont
 change the fstab file yet (you can, though)

YES change the fstab file first! Otherwise, you'll get errors like these:

Partition check:
 hda: hda1 hda2 hda3
 VFS: Mounted root (ext2 filesystem) readonly.
 Freeing unused kernel memory: 36k freed
 Unable to find swap-space signature
 Unable to find swap-space signature

What you have now in /etc/fstab tells the system that hda1 is root, and
hda2 is swap. However, since you repartitioned, hda1 and hda2 are both
linux partitions and hda3 is now swap. But since you forgot to change
/etc/fstab, it still looks for hda2 to be swap.

Right now, your fstab should look something like this:
/dev/hda1   /   ext2defaults,errors=remount-ro  0 1
/dev/hda2   noneswapsw  0 0

You need to change that to reflect your new setup. For the purposes of
this example, i'll assume that hda2 will now be /usr. Change the example
to suit.
/dev/hda1   /   ext2defaults,errors=remount-ro  0 1
/dev/hda2   /usrext2defaults,errors=remount-ro  0 2
/dev/hda3   noneswapsw  0 0

Note that in the far right column that root has a 1, /usr has a 2, and
swap has a 0. This tells the system to fsck hda1 in the first pass (before
remounting root rw), hda2 in the second pass (just before doing mount -a),
and not to fsck hda3 at all. In general, root should be 1, all other linux
partitions should be 2, and all non-linux partitions (swap, windows, etc)
should be 0.

 Once you boot it up, do mkswap /dev/hda4
 Then swapon

Correct except /dev/hda3 instead of hda4. swapon is technically
unnecessary if you're going to reboot right away.

You should also need to create a filesystem on hda2. mke2fs /dev/hda2
should be sufficient. You may need to reboot after repartitioning before
this will work right! Also, make sure hda2 is umounted before you do this.


- -- 
  finger for PGP public key.


-BEGIN PGP SIGNATURE-
Version: 2.6.3ia
Charset: noconv

iQCVAwUBN8Xobr7M/9WKZLW5AQHw+AQAoA5W4N9R/ahnWGIecmLY6R769Zwh4haa
TyQQePGuauTHR5oi5LXybtWLf/7Fdm+iUi8GZhIjqLwkO4h4VRdk/Xuh373Wxr5D
Myvm5a/36Z4sC7LtEHN6y6hUfNLtRwAG+n3iGyqpuIUjnYkmPrqmcOTchT+ydq4J
YuzHD+sB2V8=
=f+Ri
-END PGP SIGNATURE-


trouble with fdisk and activate the swap

1999-08-26 Thread Shao Zhang
Hi,
Recenltly, I repartitioned my harddisk. What I did is to delete
the swap parttion(/dev/hda2), created a 2gig linux
partition(/dev/hda2), then created a swap partition(/dev/hda3).


My fdisk output looks like this:

Command (m for help): p

Disk /dev/hda: 16 heads, 63 sectors, 8400 cylinders
Units = cylinders of 1008 * 512 bytes

   Device Boot   Start  End   Blocks   Id  System
   /dev/hda1   *1 4063  2047720+  83  Linux native
   /dev/hda2 4064 8127  2048256   83  Linux native
   /dev/hda3 8128 8400   137592   82  Linux swap

   Command (m for help): 

Now, when I do a w command, I get the following:

Syncing disks.
Re-read table failed with error 16: Device or resource busy.
Reboot your system to ensure the partition table is updated.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.

My first question: why is it happening? Do I have to reboot??

Anyway I did a reboot as suggested. But linux still cannot see the
new swap partitions created, dmesg shows the following:

Partition check:
 hda: hda1 hda2 hda3
 VFS: Mounted root (ext2 filesystem) readonly.
 Freeing unused kernel memory: 36k freed
 Unable to find swap-space signature
 Unable to find swap-space signature


My second question: How do I activate the swap partition??


Thanks for the help.

Shao.



-- 

Shao Zhang - Running Debian 2.1  ___ _   _
Department of Communications/ __| |_  __ _ ___  |_  / |_  __ _ _ _  __ _ 
University of New South Wales   \__ \ ' \/ _` / _ \  / /| ' \/ _` | ' \/ _` |
Sydney, Australia   |___/_||_\__,_\___/ /___|_||_\__,_|_||_\__, |
Email: [EMAIL PROTECTED]  |___/ 
_


Re: trouble with fdisk and activate the swap

1999-08-26 Thread Andrei Ivanov
 
  Device Boot   Start  End   Blocks   Id  System
  /dev/hda1   *1 4063  2047720+  83  Linux native
  /dev/hda2 4064 8127  2048256   83  Linux native
  /dev/hda3 8128 8400   137592   82  Linux swap

Wrong. You created Swap as a primary partition, but it has to be logical.
(/dev/hda4 it will be)

   Syncing disks.
   Re-read table failed with error 16: Device or resource busy.
   Reboot your system to ensure the partition table is updated.
   My first question: why is it happening? Do I have to reboot??

This is ok. You have to reboot to update the partition table, but dont
change the fstab file yet (you can, though)
Once you boot it up, do mkswap /dev/hda4
Then swapon

Andrew

---
 Andrei S. Ivanov  
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 UIN 12402354  
 http://scorpio.myip.org--All the pages bundled together.
---


Re: trouble with fdisk and activate the swap

1999-08-26 Thread Wayne Topa

Subject: Re: trouble with fdisk and activate the swap
Date: Wed, Aug 25, 1999 at 08:57:58PM -0500

In reply to:Andrei Ivanov

Quoting Andrei Ivanov([EMAIL PROTECTED]):
  
 Device Boot   Start  End   Blocks   Id  System
 /dev/hda1   *1 4063  2047720+  83  Linux native
 /dev/hda2 4064 8127  2048256   83  Linux native
 /dev/hda3 8128 8400   137592   82  Linux swap
 
 Wrong. You created Swap as a primary partition, but it has to be logical.
 (/dev/hda4 it will be)
  

Why is this wrong?  I have looked at all the swap man pages and find
no mention of having to use a logical partition.  I also found no 
reference to that in any of the kernel Doc pages.  In fact here is an
excerpt from the /usr/src/linux/Documentation/ide.txt
/dev/hda1 from cyl1 to  992 dos
/dev/hda2 from cyl  993 to 1023 swap
/dev/hda3 from cyl 1024 to 2100 linux

I was supprised to learn from this search, that the swap partition can 
be as large as 2 Gig, in the 2.2.x kernels.

Could you please point me to some references for your statement?

Thanks

Wayne

-- 
It works! Now if only I could remember what I did...
___
Wayne T. Topa [EMAIL PROTECTED]


Re: trouble with fdisk and activate the swap

1999-08-26 Thread Laurent PICOULEAU
On Thu, 26 Aug, 1999 à 11:49:05AM +1000, Shao Zhang wrote:
 Hi,
   Recenltly, I repartitioned my harddisk. What I did is to delete
   the swap parttion(/dev/hda2), created a 2gig linux
   partition(/dev/hda2), then created a swap partition(/dev/hda3).

[...] 
 
   Anyway I did a reboot as suggested. But linux still cannot see the
   new swap partitions created, dmesg shows the following:

[...]
 
Unable to find swap-space signature
Unable to find swap-space signature
 
   My second question: How do I activate the swap partition??

You could have found the answer in two steps :
  -$ apropos swap
would have listed you all the man pages dealing with swap, then
  -$ man mkswap 
would have explained to you all that you needed.

-- 
 ( -   Laurent PICOULEAU  - )
 /~\   [EMAIL PROTECTED]  /~\
|  \)Linux : mettez un pingouin dans votre ordinateur !(/  |
 \_|_Seuls ceux qui ne l'utilisent pas en disent du mal.   _|_/