Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

How to get new kernel ?


znavko

Question

Hello! I emerged gentoo-sources to try if my Lenovo G50-30 will not freeze suddenly on it.

I do not know where get config for it. I used config from /usr/src/debian-sources dir - last saved config that I think is workable. Is it right?

It compiled, but there is no new kernel in /boot. What to do after compilatioon?

 

Link to comment
Share on other sites

Recommended Posts

  • 0

Genkernel provides a generic configuration that works with gentoo-sources,vanilla-sources.

Verify /usr/src/linux is symlinked to the kernel sources to be built:
eselect kernel list
Available kernel symlink targets:
  [1]   linux-4.4.115 *
  [2]   linux-debian-sources-3.19.3
* is pointing to linux-4.4.115 vanilla sources
ls -la /usr/src/linux
lrwxrwxrwx 1 root root 13 Feb 23 23:37 /usr/src/linux -> linux-4.4.115

Command to build:

genkernel all

Genkernel installs my completed build of linux-4.4.115 to /boot

ls /boot
System.map-debian-sources-x86_64-3.19.3-1~exp1
System.map-genkernel-x86_64-4.4.115
initramfs-debian-sources-x86_64-3.19.3-1~exp1
initramfs-genkernel-x86_64-4.4.115
intel-uc.img
kernel-debian-sources-x86_64-3.19.3-1~exp1
kernel-genkernel-x86_64-4.4.115

After configuring grub I reboot into new kernel:

uname -a 
Linux funtoo 4.4.115 #1 SMP Fri Feb 23 22:06:22 EST 2018 x86_64 Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz GenuineIntel GNU/Linux

 

Link to comment
Share on other sites

  • 0

okay. How to config kernel when install manually?

My /boot contains lthis

/boot # ls -la
итого 33025
drwxr-xr-x  4 root root    1024 фев 17 14:18 .
drwxr-xr-x 21 root root    4096 фев 16 23:05 ..
drwxr-xr-x  6 root root    1024 фев 17 10:06 grub
-rw-r--r--  1 root root 9287700 фев 17 06:03 initramfs-debian-sources-x86_64-4.14.12-2
-rw-r--r--  1 root root 8003644 дек 28  2016 initramfs-debian-sources-x86_64-4.8.15-1
-rw-r--r--  1 root root       0 фев 17 14:18 .keep_sys-apps_baselayout-0
-rw-r--r--  1 root root 5236496 фев 17 04:14 kernel-debian-sources-x86_64-4.14.12-2
-rw-r--r--  1 root root 4322880 дек 28  2016 kernel-debian-sources-x86_64-4.8.15-1
drwx------  2 root root   12288 фев 16 19:53 lost+found
-rw-r--r--  1 root root  150024 фев 17 10:01 memtest86.bin
-rw-r--r--  1 root root 3285399 фев 17 04:14 System.map-debian-sources-x86_64-4.14.12-2
-rw-r--r--  1 root root 3368872 дек 28  2016 System.map-debian-sources-x86_64-4.8.15-1

The link https://www.funtoo.org/Building_a_Kernel_from_Source says

Quote

Copy configurations if you have previous configurations to copy:


# cp /boot/config-3.13.7 .config

What to do if I use gentoo-sources first time? I have no sense which modules I need and will current kernel config help me or not.

Link to comment
Share on other sites

  • 0

Thank you @cardinal! Your advise was simple for reproducing. But one question rested.

I run this

''' my /dev/sda1 does not mount itself
# mount /dev/sda1 /boot
# cd /usr/src
# rm linux
# ln -sf /usr/src/linux-4.15.7-gentoo-r1 /usr/src/linux
# cd /usr/src/linux
# eselect kernel list
Available kernel symlink targets:
  [1]   linux-4.15.7-gentoo-r1
  [2]   linux-debian-sources-4.14.12 *
# eselect kernel set 1
# genkernel --menuconfig all
''' then I load last config from linux-debian-sources-4.14.12 and exit menu
''' it compiled kernel and modules
''' and put into /boot dir newkernel

# boot-update -v

boot-update 1.8.2 /
Copyright 2009-2017 Funtoo Technologies

 [use option "-l" for license info, "-h" for help]

  * Generating config for grub...

  DEFAULT > Funtoo Linux genkernel - kernel-genkernel-
          x86_64-4.15.7-gentoo-r1
            Funtoo Linux genkernel - kernel-debian-sources-x86_64-4.8.15-1
            Funtoo Linux genkernel - kernel-debian-sources-x86_64-4.14.12-2
            memtest86+

  * NOTE: Detected MBR boot. Configuring for Legacy MBR booting.
  * WARN: multiple matches found for default "Funtoo Linux
          genkernel" - most recent used.

  * Completed successfully with warnings.

# reboot

 

I saw new kernel's line in grub during boot,  gentoo-sources was default. I got error message during start: wpa_supplicant could not started.

I check lsmod and saw Atheros/Qualcom driver was absent. https://bpaste.net/show/a1aaf108a5fd

This manual helped me to setup WLAN driver on Funtoo https://wireless.wiki.kernel.org/en/users/drivers/ath9k

I reconfigured kernel checking new lines:

Quote

Device drivers -> Network devices -> Wireless LAN ->
* Atheros/Qualcomm devices
M Atheros 5xxx wireless cards support
M Atheros 5xxx PCI bus support
M Atheros 802.11n wireless cards support
 * Atheros ath9k PCI/PCIe bus support
M Atheros 802.11ac wireless cards support
 M Atheros ath10k PCI support

I just saw `genkernel --menuconfig all` loading debian-sources config and checked all options I found in the other terminal with `genkernel --menuconfig all` (configuring gentoo-sources).

WLAN works.

But I cannot mount /dev/sda1 and `fdisk -l` looks another

# mount /dev/sda1 /boot
mount: special device /dev/sda1 does not exist

# fdisk -l
Диск /dev/ram0: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram1: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram2: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram3: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram4: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram5: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram6: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram7: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram8: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram9: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram10: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram11: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram12: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram13: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram14: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/ram15: 8 MiB, 8388608 байт, 16384 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 4096 байт
Размер I/O (минимальный/оптимальный): 4096 байт / 4096 байт


Диск /dev/sda: 111,8 GiB, 120034123776 байт, 234441648 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 512 байт
Размер I/O (минимальный/оптимальный): 512 байт / 512 байт
Тип метки диска: dos
Идентификатор диска: 0x462af8c6

Устр-во    Загрузочный  начало     Конец   Секторы Размер Идентификатор Тип
/dev/sda1  *              2048    264191    262144   128M            83 Linux
/dev/sda2               264192   4458495   4194304     2G            82 Linux св
/dev/sda3              4458496 234442751 229984256 109,7G            83 Linux

I think I need configure kernel to work with disks? Which options should I enable?

Link to comment
Share on other sites

  • 0

I found my new kernel config lacks lot of options in 'Pseudo filesystems' and all other sections. Completely empty config. How to determine which option I need to mount /dev/sda1 ?

# cat /etc/fstab
...
# <fs>			<mountpoint>	<type>		<opts>		<dump/pass>

/dev/sda1		/boot		ext2		noauto,noatime	1 2
/dev/sda2		none		swap		sw		0 0
/dev/sda3		/		ext4		noatime		0 1
#/dev/cdrom		/mnt/cdrom	auto		noauto,ro	0 0

 

Link to comment
Share on other sites

  • 0
13 minutes ago, jhan said:

Do you have ext2 support enabled in gentoo-sources?

yes

# cat /usr/src/linux/.config
...
#
# File systems
#
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_FS_IOMAP=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y

 

Link to comment
Share on other sites

  • 0
$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 111,8G  0 disk 
├─sda1   8:1    0   128M  0 part 
├─sda2   8:2    0     2G  0 part 
└─sda3   8:3    0 109,7G  0 part /

# blkid
/dev/sda3: UUID="bf52e7c6-fe5a-49ad-9c63-006a4636caf9" TYPE="ext4"

 

Link to comment
Share on other sites

  • 0
# fdisk -l /dev/sda
Диск /dev/sda: 111,8 GiB, 120034123776 байт, 234441648 секторов
Единицы: секторов по 1 * 512 = 512 байт
Размер сектора (логический/физический): 512 байт / 512 байт
Размер I/O (минимальный/оптимальный): 512 байт / 512 байт
Тип метки диска: dos
Идентификатор диска: 0x462af8c6

Устр-во    Загрузочный  начало     Конец   Секторы Размер Идентификатор Тип
/dev/sda1  *              2048    264191    262144   128M            83 Linux
/dev/sda2               264192   4458495   4194304     2G            82 Linux св
/dev/sda3              4458496 234442751 229984256 109,7G            83 Linux

#  cat /proc/filesystems | grep 'ext*'
	ext3
	ext4
	ext2

# mount /dev/sda1 /boot
mount: special device /dev/sda1 does not exist

this is the problem.

PS: how to set English for terminal output temporary?

Link to comment
Share on other sites

  • 0

anything in dmesg that would help to debug, can you paste maybe the whole dmesg somewhere?

ad PS you have to switch locale to change terminal output

~ ❯❯❯ LC_ALL=de_DE.UTF-8 date
Fr 9. Mär 21:35:31 CET 2018
~ ❯❯❯ date
Fri Mar  9 21:35:33 CET 2018

~ ❯❯❯ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=POSIX
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
~ ❯❯❯ LC_ALL=de_DE.UTF-8 locale
LANG=en_US.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=de_DE.UTF-8

 

Link to comment
Share on other sites

  • 0

no, i am not creating partition. but I used tool from systemrescuecd to restore partitions cause in last installation I needed to save data on disk and clicked accidentally to mkfs... cannot remember details, but that tool helped to restore partitions and now I am using that partition I had before reinstall. so may be this is causing the problem?

# dmesg
''' all the white and read lines (and near sda):
[    1.494327] ACPI Warning: GPE type mismatch (level/edge) (20170831/evxface-826)
[    4.530030] pci 0000:00:1d.0: EHCI: BIOS handoff failed (BIOS bug?) 01010001

[    5.165215] OCFS2 User DLM kernel interface loaded
[    5.190611] hpet: number irqs doesn't agree with number of timers
[    5.472965] libata version 3.00 loaded.
[    5.729604] ahci 0000:00:13.0: version 3.0
[    5.729768] ahci 0000:00:13.0: controller can't do DEVSLP, turning off
[    5.739907] ahci 0000:00:13.0: AHCI 0001.0300 32 slots 2 ports 3 Gbps 0x1 impl SATA mode
[    5.739910] ahci 0000:00:13.0: flags: 64bit ncq pm led clo pio slum part deso 
[    5.740566] scsi host0: ahci
[    5.740741] scsi host1: ahci
[    5.740803] ata1: SATA max UDMA/133 abar m2048@0x90804000 port 0x90804100 irq 87
[    5.740805] ata2: DUMMY
[    6.071833] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    6.078814] ata1.00: ATA-9: SanDisk SDSSDA120G, Z32080RL, max UDMA/133
[    6.078816] ata1.00: 234441648 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
[    6.095564] ata1.00: configured for UDMA/133
[    6.095784] scsi 0:0:0:0: Direct-Access     ATA      SanDisk SDSSDA12 80RL PQ: 0 ANSI: 5
[    6.096186] sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/112 GiB)
[    6.096206] sd 0:0:0:0: [sda] Write Protect is off
[    6.096209] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    6.096240] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.097244]  sda: sda1 sda2 sda3
[    6.097344] sda: p3 size 229984256 extends beyond EOD, enabling native capacity
[    6.098164]  sda: sda1 sda2 sda3
[    6.098250] sda: p3 size 229984256 extends beyond EOD, truncated
[    6.098614] sd 0:0:0:0: [sda] Attached SCSI disk
[    6.148834] psmouse serio1: synaptics: queried max coordinates: x [..5670], y [..4794]
[    6.158227] EXT4-fs (sda3): INFO: recovery required on readonly filesystem
...
[    7.490392] EXT4-fs (sda3): orphan cleanup on readonly fs
[    7.490536] EXT4-fs (sda3): 4 orphan inodes deleted
[    7.490538] EXT4-fs (sda3): recovery complete
[    7.494308] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[    9.081225] udevd[2267]: starting version 3.2.2
[    9.127775] udevd[2268]: starting eudev-3.2.2

[    9.182601] ACPI: Power Button [PWRF]
[    9.185816] ACPI: Deprecated procfs I/F for AC is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared
[    9.185872] ACPI: AC Adapter [ADP0] (on-line)
[    9.211123] ACPI: Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared
[    9.211129] ACPI: Battery Slot [BAT0] (battery present)

[    9.223005] r8169 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control
[    9.251009] r8169 0000:03:00.0 eth0: RTL8168g/8111g at 0x000000004478d41e, 28:d2:44:a4:73:82, XID 10900800 IRQ 88

[    9.323449] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    9.326613] udevd[2294]: inotify_add_watch(7, /dev/sda1, 10) failed: No such file or directory
[    9.327055] udevd[2285]: inotify_add_watch(7, /dev/sda2, 10) failed: No such file or directory
[    9.332921] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    9.336635] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    9.336639] cfg80211: failed to load regulatory.db

[ 5343.086258] udevd[8043]: inotify_add_watch(7, /dev/sda1, 10) failed: No such file or directory
[ 5343.087318] udevd[8045]: inotify_add_watch(7, /dev/sda2, 10) failed: No such file or directory
[ 5353.038552] udevd[8047]: inotify_add_watch(7, /dev/sda1, 10) failed: No such file or directory
[ 5353.039418] udevd[8049]: inotify_add_watch(7, /dev/sda2, 10) failed: No such file or directory

thank you for your attention. is it partition table gap?

# LC_ALL=en partprobe -s
Error: Can't have a partition outside the disk!

 

Link to comment
Share on other sites

  • 0

in a qna site i read about raid and dolvm in grub.cfg. I rebooted to debian-sources to get access to /dev/sda1. if it is useful here my grub.cfg that I did not touch:

# cat /boot/grub/grub.cfg
set timeout=3

  insmod part_msdos
  insmod ext2
  set root=(hostdisk//dev/sda,msdos1)
  search --no-floppy --fs-uuid --set 47173c48-55db-4ef0-9803-91bf2303baf6
if loadfont /grub/unifont.pf2; then
   set gfxmode=text
   insmod all_video
   terminal_output gfxterm
fi

set menu_color_normal=cyan/blue
set menu_color_highlight=blue/cyan

menuentry "Funtoo Linux genkernel - kernel-genkernel-x86_64-4.15.7-gentoo-r1" {
  insmod part_msdos
  insmod ext2
  set root=(hostdisk//dev/sda,msdos1)
  search --no-floppy --fs-uuid --set 47173c48-55db-4ef0-9803-91bf2303baf6
  linux /kernel-genkernel-x86_64-4.15.7-gentoo-r1 rootfstype=auto real_root=/dev/sda3 rootfstype=ext4
  initrd /initramfs-genkernel-x86_64-4.15.7-gentoo-r1
	set gfxpayload=keep
}

menuentry "Funtoo Linux genkernel - kernel-debian-sources-x86_64-4.8.15-1" {
  insmod part_msdos
  insmod ext2
  set root=(hostdisk//dev/sda,msdos1)
  search --no-floppy --fs-uuid --set 47173c48-55db-4ef0-9803-91bf2303baf6
  linux /kernel-debian-sources-x86_64-4.8.15-1 rootfstype=auto real_root=/dev/sda3 rootfstype=ext4
  initrd /initramfs-debian-sources-x86_64-4.8.15-1
	set gfxpayload=keep
}

menuentry "Funtoo Linux genkernel - kernel-debian-sources-x86_64-4.14.12-2" {
  insmod part_msdos
  insmod ext2
  set root=(hostdisk//dev/sda,msdos1)
  search --no-floppy --fs-uuid --set 47173c48-55db-4ef0-9803-91bf2303baf6
  linux /kernel-debian-sources-x86_64-4.14.12-2 rootfstype=auto real_root=/dev/sda3 rootfstype=ext4
  initrd /initramfs-debian-sources-x86_64-4.14.12-2
	set gfxpayload=keep
}

menuentry "memtest86+" {
  linux16 /memtest86.bin
}
set default=0

 

Link to comment
Share on other sites

  • 0
43 minutes ago, znavko said:

[ 6.097344] sda: p3 size 229984256 extends beyond EOD, enabling native capacity [ 6.098164] sda: sda1 sda2 sda3 [ 6.098250] sda: p3 size 229984256 extends beyond EOD, truncated

I think that your partition table is somehow corrupt (EOD = end of drive) so the partitions are created larger then the drive. I personally would start over from scratch wiping the drive (backing up data before).

Link to comment
Share on other sites

  • 0
# LC_ALL="en" fdisk /dev/sda1

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device /dev/sda1 already contains a ext2 signature.
The signature will be removed by a write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xba86f0bc.

Command (m for help): p
Disk /dev/sda1: 128 MiB, 134217728 bytes, 262144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xba86f0bc

Command (m for help): v
Remaining 262143 unallocated 512-byte sectors.

Command (m for help): q

I hope I have a possibility to write necessary partitions not crashing entire system.

Please, can I prepare disk using https://www.funtoo.org/Install#Prepare_Hard_Disk  with that difference that I will not empty partition table with 'o' choice in fdisk tool?

I will only create ext2: from 0 to 128M and swap to 2G. Will my sda3 rest after making this stuff?

Link to comment
Share on other sites

  • 0
# LC_ALL="en" fdisk /dev/sda

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x462af8c6

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1  *       2048    264191    262144   128M 83 Linux
/dev/sda2        264192   4458495   4194304     2G 82 Linux swap / Solaris
/dev/sda3       4458496 234442751 229984256 109.7G 83 Linux

Command (m for help): v
Total allocated sectors 234442752 greater than the maximum 234441648.

Command (m for help): ^Z

 

Link to comment
Share on other sites

  • 0
43 minutes ago, znavko said:

Total allocated sectors 234442752 greater than the maximum 234441648.

znavko, backup data and start fresh with wiping the partition table, if you can. I don't know how non-destructive it would be to delete partition 3 and recreate it and hope that the filesystem is going to recognize it and be happy about the change. My recommendation it to start from scratch. You have done probably some strange things while creating this partition table. There are tools to manipulate partitions like parted and gparted, but as I've said making a backup and starting again will probably take less time then running some operation on the disk to fix the errors and with unknown result.

Plan for znavko:

  1. backup data
  2. create new partition layout recreating the partitions from scratch
  3. copy data back
  4. done and happy
Link to comment
Share on other sites

×
×
  • Create New...