Making a native partition an extension

Linux newbie here, had a kernel panic and didn’t know how to fix it so I reformatted.

I didn’t delete my old extension and recently mounted it so I could retrieve the data. I was wondering if there was any way I could make it the extension to my current native without deleting any of the data? Or if attaching it as an extension was at all possible at this point.

Any help would be much appreciated.

I’m as puzzled as you with this question?
Not making sense here…

What exactly is your ‘extension’?

caf4926 wrote:
> What exactly is your ‘extension’?

for example, are you calling an external USB hard drive your “extension”?

if so, yes–if you didn’t format the USB drive it is possible to use
it with your new install…

note: most kernel panics are caused by bad RAM or very faulty
software…did you boot the install disk and do both the “Check
Installation Media” and the “Memory Test” (which checks RAM) shown in
this slide http://tinyurl.com/25ydj4a

the RAM test needs to run for several hours, like overnight…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

I admit that I have the same problem as the others. It seems to be about partitions and file systems, but I am afraid that you are using some wording that embarrasses people.

Maybe you could update yourself a bit with reading: SDB:Basics of partitions, filesystems, mount points - openSUSE

You can also provide us more information about your partitioning by posting the output of

fdisk -l

(if it is realy about partitions).

So my extension is another partition in the disk where I used to keep all my media.

http://pics.livejournal.com/noospaper/pic/0000dgfg

I believe sda2 is where my OS is, and sda3 used to be an extension to my old operating system before I reformatted. Both were Opensuse.

This is what happens when I enter fdisk -l.

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbc22bc22

Device Boot Start End Blocks Id System
/dev/sda1 * 16996 18397 11253760 f W95 Ext’d (LBA)
/dev/sda2 1 2611 20971520 83 Linux
/dev/sda3 2611 16996 115539968 83 Linux
/dev/sda5 16996 17186 1532928 82 Linux swap / Solaris
/dev/sda6 17187 18397 9718784 83 Linux

Partition table entries are not in disk order

I really hope I’m making sense. I read the article and it’s still a bit fuzzy to me. Thanks to all who have been helping.

A very strange set up.

If it were mine I would want to wipe it and re-do it because I couldn’t live with it just knowing it was like that :wink:

sda2 is your /home partition where all your user files are
sda5 is where the OS resides

sda3 seems to be the partition you refer to as your extension.

It is possible though to delete sda3 to create free space where it resides and then resize sda2 to use all that space.
But it ain’t pretty and sda5 is a little small for my liking anyway.

It is a pitty that you did not post the fdisk output between CODE tags instead of what you did now. Now it is barely readable, which you will admit as you have seen the nice columns yourself. For using CODE you have to use the Go Advanced button below right (alas) and then you can select the text and click the # button in the toolbar.

Nevertheless I tried to interprete your fdisk output. I still do not understand what you mean by an extention. I will use the word Extended partition, but that may be somethig completely different from what you use he word for. Be warned.

sda1 is an (the ) Extended partition, that means it holds other, so called Logical partitions, in this case it holds sda5 and sda6. It is a bit strange that your partition table starts with it, normaly it would have been on third place (and called sda3),that is why the warning is there, but this is not fatal, we can live with it.

sda2 is a Primary partition fit for a Linux file system. Seems to be used for your /home.

sda3 is a Primary partition fit for a Linux file system. Seems to be used for your /srv (are you an Apache web server).

sda5 is a Logical partition fit for Linux Swap. Used for swap of course.

sda6 is a Logical partition fit for a Linux file system. Seems to be your root (/) file system.

Now,apart from the strange sequence in the partition table, this is quite normal. When you want to use sda3 for something different that is quite possible. Are you sure there nothing on it of use? Normaly the openSUSE installation puts there some skeleton directories and example files for a web server. And while it is mounted on /srv I would think a complete web server bunch of files is there, for what other reason would it be there???

Else you can use YaST (well some people love Gparted, but YaST > System > Partitioning is quite capable of doing this), to mount it elsewhere where you need it. When you let YaST also format it as e.g. ext4, it will be emptied.

Thank you so much!

@noospaper Original Poster

It appears that you only created an extended partition and logical partitions within it.
I agree its most likely sda3 or /srv may have contained the old operating system or as suggested servers like Apache.
While sda2 is /home and sda6 is the / (root) OS.

Pls print output from


mount
#
ls -hal   /home 
ls -hal   /srv 
ls -hal   / 

Silly me, I was calling it an extension when I believe it’s supposed to be an extended partition? Anyways I admit it’s pretty sloppy, but I just want to attach it back so I can save everything on it.

This is what I get when I enter the mount code.

mount
/dev/sda6 on / type ext4 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
devtmpfs on /dev type devtmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,mode=1777)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda2 on /home type ext4 (rw,acl,user_xattr)
/dev/sda3 on /srv type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
gvfs-fuse-daemon on /home/Cyrus/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=Cyrus)
Cyrus@linux-ujjj:~> #
Cyrus@linux-ujjj:~> ls -hal /home
total 28K
drwxr-xr-x 4 root root 4.0K 2010-09-10 00:36 .
drwxr-xr-x 22 root root 4.0K 2010-09-10 10:30 …
drwxr-xr-x 38 Cyrus users 4.0K 2010-09-10 12:14 Cyrus
drwx------ 2 root root 16K 2010-09-10 00:17 lost+found
Cyrus@linux-ujjj:~> ls -hal /srv
total 28K
drwxr-xr-x 4 root root 4.0K 2010-08-03 20:43 .
drwxr-xr-x 22 root root 4.0K 2010-09-10 10:30 …
drwxr-xr-x 54 Cyrus users 4.0K 2010-09-09 21:54 Cyrus
drwx------ 2 root root 16K 2010-08-03 10:04 lost+found
Cyrus@linux-ujjj:~> ls -hal /

When you do not post your computer output between CODE tags, I stop reading it and leave it to persons with better eyes then me.

And we repeat, we do not understand what you want. All partitions are in use. Either used as Swap, or mounted on /, /home and /srv. You are the only one that can decide if the one on /srv can be used for something else. And of course the Extended partition is used for holding sda5 and sda6 and is thus also used.

BTW you say the whole thing started with a kernel panic. I never heard that a kernel panic is cured by “reformating”. Thus the whoel story is not a bit vague, but very vague.

Is there an explanation of how to use the code tags I have trouble trying to depict how it works.

 this is where output should be posted 

this is how output should be posted

It sounds to me like our friend @noospaper just needs to have this partition accessible

Perhaps @noospaper you don’t realise all the contents of sda3 are currently mounted at /srv
Open file manager, press Ctrl+L, now in the address bar hit backspace to clear everything and type: /srv
Hit enter and you can now see everything on sda3

If you want to mount it to a proper location for user use, please post the result of this:

cat /etc/fstab

To using code tags you need to press the Go Advance button to get the full editor not the stripped down one used for quick replies. Or you can just type the code tags. in square brackets ] put CODE to start the code block and /CODE to end the code block

Frst paragraph in post #7 above.

@caf4926 has it right. I just want to be able to access my sda3 so I can retrieve all the data.

Here are the results of when I enter cat /etc/fstab:


/dev/disk/by-id/ata-FUJITSU_MHW2160BH_PL_K10NT772LHWY-part5 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-FUJITSU_MHW2160BH_PL_K10NT772LHWY-part6 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-FUJITSU_MHW2160BH_PL_K10NT772LHWY-part2 /home                ext4       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
/dev/disk/by-id/ata-FUJITSU_MHW2160BH_PL_K10NT772LHWY-part3 /srv                 ext4       defaults              1 2

I hope that was the right way to enter code btw. And thanks for those that have been been able to understand what I’m trying to explain. I’m very very new to this.

This is perfectly readable code! Thank you for taking the trouble to find out how to do it. Congratulations. :shake:

What we read here is what we allready know. sda3 is to be mounted at /srv at boot. And we saw earlier that it is mounted at /srv (no surpriise).
Thus you can find all tha data on sda3 by surfing to* /srv*. It is all there, all the time, what is your problem? :slight_smile:

The only thing you might whish is having it mounted on another place. It is up to you, you know what sort of data it is (movies, music, mix of everything) and where it logicaly should be.
When it is your personal data you could want to have it at /home/<your-username>/my-extra-disk. Or any other place. You only have to do the following:

  1. create the directory where it should be mounted, using my example that would be:
mkdir /home/<your-username>/my-extra-disk

(of course replace* <your-username>* with your username).
2) replace the /srv in the last line of your */etc/fstab *with /home/<your-username>/my-extra-disk.
3) reboot (reboot is not realy needed, but I am to lazy to explain other metods).

@hcvv thank you so much. This is exactly what I want to do. I finished step 1, but I’m kind of confused at step 2.

  1. replace the /srv in the last line of your /etc/fstab with /home/<your-username>/my-extra-disk.

I’m not really sure how to replace it. Do I go back in the terminal and type cat /etc/fstab?

Use the editor of your choice (as root) to edit this. I would do this from a terminal (like Konsole) using vi, but when you never did this I would not recommend this.
When you are a KDE user and know Kwrite use* kdesu kwrite*.

BTW, did you look in /srv and beyond and did you see what you hoped to see?