You are not logged in.

#1 2012-12-06 19:45:54

Ferdinandum
Member
Registered: 2012-12-06
Posts: 1

fdisk problem

I have this error when save the configuration

WARNING: Re-reading the partition table failed with error 22: Invalid argument. The kernel still uses the old table.

I want to create 2 primary partition

This is the sequence

    # /sbin/mkfs.ext3 /dev/sda1


    # /sbin/fdisk  /dev/sda1

FIRST PARTITION
    # Command: p (p = listado de particiones)
    # Command: n (n = nueva partición)
    # Command: p (p = partición primaria)
    # Partition number: 1 (numero de la partición)
    # First cylinder: poner el primero que deje
    # Last cylinder:  +250M (250 Mb)

Linux Swap
    # Command: t (t = cambiar el tipo de partición)
    # Hex code: 82 (82 = Linux Swap)

SECOND PARTITION
    # Command: n
    # Command: p
    # Partition number: 2
    # First cylinder:  default
    # Last cylinder: default

- Guardar la Configuración
    # Command: w (w = guardar y salir)

Offline

#2 2012-12-07 00:33:54

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: fdisk problem

Did you reboot?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2012-12-07 00:38:12

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: fdisk problem

This makes no sense to me at all.  You first made a filesystem on a partition, then you tried to partition the partition?  And you tried to put a swap partition *within* your linux parition with an ext3 filesystem?

Are you also trying to do this on a mounted filesystem from which your current OS is running?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2012-12-07 00:45:59

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: fdisk problem

I didn't even notice that. I assumed swap was the first primary partition and then there was a second partition with unspecified fs and just remembered seeing the comment about the kernel using an old partition table. I didn't even know you could run fdisk /dev/sda1 - shouldn't it complain and refuse to proceed?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2012-12-07 00:55:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: fdisk problem

I just tried running fdisk on a mounted partition - it didn't complain and seemed happy enough to proceed.  I did not, however, test it on any of my system partitions - nor would I.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2012-12-07 01:04:51

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: fdisk problem

Interesting - the man page suggested it shouldn't work.

(I can't test it as I'm using a GPT map.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB