LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 02-25-2013, 10:00 PM   #1
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Rep: Reputation: 0
fdisk fails in Slackware 14 - why?


Downloading Slackware 14 and burning the DVD was new territory for me, yet it appeared full of promise. However, when I booted from the DVD and tried to use fdisk I was unexpectedly confronted with this error message: "fdisk.bin: unable to open /dev/hdb".

My command was "fdisk /dev/hdb" because that is where I had previously installed an early version of Slackware to test the hardware. The primary IDE slave drive (40GB) is to be dedicated to Linux. The primary IDE master drive (80GB) boots into WinXP Pro as an option at the LILO prompt. Note: the default boot is Linux.

The AMI BIOS in the dual-booting 'LinWin' box has these parameters set: cylinders=10011, heads=255, sectors=63.
The original Slackware version allowed me to configure the same parameters in fdisk by selecting expert mode. The machine happily boots Linux version 1.2.1 (!) and fdisk reports four partitions /dev/hdb1, 2, 3 and 4.

Here's the current hard drive config.:
Disk 1 (/dev/hda)
Filesystem Size

Ext2 (lilo) 1.0MB
NTFS (C drive) 68.4GB
osshare (D drive) 8.2GB

Disk 2 (/dev/hdb)
Filesystem Size

Ext2 2.0GB (156MB used)
other 2.0GB
other 2.0GB
other 2.0GB
unallocated 30.5GB

The plan is to reallocate the whole of the second disk to the latest version of Slackware with partitions sized appropriately for the intended mount points, which will probably be /, /usr, /X11 and swap.

Why is the new Slackware not recognising the partition table on disk 2?

Any help in resolving this curious problem will be greatly appreciated!
 
Old 02-25-2013, 10:24 PM   #2
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,298

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Modern kernels use libata instead of the old IDE system, so even IDE drives will appear as sd* instead of hd*. If you look in /dev you will probably see /dev/sda and /dev/sdb (but you should verify with fdisk to make sure you know which is which -- don't rely on it still being sdb).
Code:
fdisk -l
should list all drives.
 
Old 02-26-2013, 12:06 AM   #3
lee88abc
Member
 
Registered: Apr 2011
Location: northeast USA
Distribution: slackware
Posts: 30

Rep: Reputation: 0
yah, like he said, its sda...sdb...etc..
no more hda.
after you tried fdisk -l
please paste output here.
 
Old 02-26-2013, 06:43 AM   #4
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks guys, I didn't know the hd* devices were history! Here's the output from the command "# fdisk -l"

Disk /dev/sda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders, total 160836480 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
Disk identifier: 0x99539953

Device Boot Start End Blocks Id System
/dev/sda1 63 160649 80293+ 83 Linux
/dev/sda2 * 160650 143524709 71682030 7 HPFS/NTFS/exFAT
/dev/sda3 143524710 160826714 8651002+ c W95 FAT32 (LBA)

Disk /dev/sdb: 41.2 GB, 41174138880 bytes
255 heads, 63 sectors/track, 5005 cylinders, total 80418240 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
Disk identifier: 0xd336d336

Device Boot Start End Blocks Id System
/dev/sdb1 63 4112639 2056288+ 83 Linux
/dev/sdb2 4112640 8241344 2064352+ 83 Linux
/dev/sdb3 8241345 12370049 2064352+ 83 Linux
/dev/sdb4 12370050 16514819 2072385 83 Linux
-------------------------------------------------------------
Now I can re-partition at will

Btw, I tried printing the above to an old dot matrix line printer that was known as /dev/lp1 on the old Slackware. I also tried using /dev/parport0 and /dev/parport1 but they didn't work either. The tunelp command is apparently not available during the DVD boot session so I don't know how to check other than look at the system messages in dmesg, which has this to say about the parallel printer port config.:
"parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP, TRISTATE, EPP]"

Any ideas on how to get the printer going?
 
Old 02-26-2013, 09:52 AM   #5
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Ok, no worries, now that Slackware 14 is installed the printer is /dev/lp0 and it prints!
However, the video mode is upset during the boot.
I configured Lilo to take care of the dual booting and it starts up fine with vga=normal.
Near the end of the boot messages the font/video mode changes and I lose the first character
on every line. The vidmode command is not found so how can I set the video mode back to normal?
Which startup script is responsible for changing it in the first place?
 
Old 02-26-2013, 10:27 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
The resolution is set by the driver, not a startup script. The vga= option is deprecated for modern drivers with Kernel Mode Setting, append the option
Code:
video=1024x768
to your append line in liloconfig, where you replace 1024x768 with your favorite resolution.
 
Old 02-27-2013, 03:46 PM   #7
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,241

Rep: Reputation: 196Reputation: 196
ramchip,

When you’ll partition the hard drive for the next time instead of fdisk use cfdisk. The fdisk causes the problems with the partitions boundaries. Even the fdisk developers advise to use cfdisk:

man fdisk
Quote:
There are several *fdisk programs around. Each has its problems and strengths. Try them in the order cfdisk, fdisk, sfdisk. (Indeed, cfdisk is a beautiful program that has strict requirements on the partition tables it accepts, and produces high quality partition tables. Use it if you can. fdisk is a buggy program that does fuzzy things -- usually it happens to produce reasonable results. Its single advantage is that it has some support for BSD disk labels and other non-DOS partition tables. Avoid it if you can. sfdisk is for hackers only -- the user interface is terrible, but it is more correct than fdisk and more powerful than both fdisk and cfdisk. Moreover, it can be used noninteractively.)
 
Old 02-28-2013, 08:55 AM   #8
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for that advice.

I've partitioned the disk and installed Slackware 14 but I don't have any swap space and question the necessity for it considering that the
LinWin box has 3GB of ram! I left a small primary partition (1.4GB) unallocated at the end of the Linux disk with the idea that this *could* be assigning as a swap partition, if necessary.

Using cfdisk and selecting partition type 82 and choosing 'write' for this last partition gives me the warning that doing so "might destroy data". Surely, in this case I can ignore the warning. If the partition table is already complete apart from one type assignment, i.e. no size changes, can
I go ahead and 'write' without any disaster?
 
Old 03-12-2013, 07:20 PM   #9
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,241

Rep: Reputation: 196Reputation: 196
Sorry. I forgot about that thread and it seems that the whole world did the same.

The answer is yes. You can change the type of the partition and write that without spoiling the other partitions.

Then use:

mkswap /dev/sdaX

and:

swapon /dev/sdaX

Finally put something like this at the beginning of /etc/fstab:

Code:
/dev/sdaX        swap             swap        defaults         0   0
 
Old 03-29-2013, 11:05 AM   #10
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks w1k0 and other contributors. I think we can consider this thread closed now!
 
Old 04-01-2013, 04:38 PM   #11
xj25vm
Member
 
Registered: Jun 2008
Posts: 262

Rep: Reputation: 17
ramchip - you might want to mark this thread as 'solved' so that people scanning the forum for posts to answer to will know this thread is closed. You will find the option under "Thread tools" at the top of the thread, above the first post.
 
Old 04-05-2013, 07:29 AM   #12
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks xj25vm, thread now closed as recommended.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fdisk fails to create partition, but drive has free space whysyn Linux - Software 3 04-17-2007 03:13 PM
problems with fdisk and cfdisk on slackware 10.2 Tiepo Slackware 11 02-08-2006 08:49 AM
Partition with fdisk fails!? nr5 Linux - Software 12 01-11-2005 03:03 PM
is FDISK built-in in Slackware? unixfreak Slackware 7 08-09-2004 11:33 PM
Slackware 9.0 installation - can't fdisk xlinuxSlayer Linux - General 2 09-25-2003 05:05 PM


All times are GMT -5. The time now is 03:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration