LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-17-2009, 04:54 AM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Oh-no-what did I do?1


Trying to re-install Slack on my laptop last night. Problems with USB CDROM during install-slackware install corrupted-after reboot to try again--typed "setup", then "no partitions found-use cfdisk".
??I had just formatted it EXT3 before!
Anyway-says the block size is 8094-should be 1024-says there's overlapping partitions.
Used fdisk to delete and make new partitions, thrn cfdisk-still screwed up...What can I do?
 
Old 03-17-2009, 05:52 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,562

Rep: Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497
I would try to zero the beginning of the disk:
Code:
dd if=/dev/zero of=/dev/the_disk_to_be_formatted bs=512 count=1000
Of course I suppose that you have no valuable data on this disk and you know what will happen if you type a wrong device name. Anyway, triple check your command before hitting the 'Return' key

Afterward proceed with fdisk as usual.

PS Please be patient while dd is running.
 
Old 03-17-2009, 06:16 AM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
OK-it's only got a 4GB HD-so I want to wipe it and somehow restore whatever is the best layout-somehow something went wrong-'cause after booting up slack via usb-I logged in, typed setup and "no partitions on HD-use fdisk/cfdisk.
typed cfdisk-error-no partitions-unknown partitions.
typed fdisk /dev/hda
partitions=1-4??(should only be 2-hda1/ and hda2/swap.
anyway, tried to figure out what the defaults should be-cylinders, sectors, etc-I don't know the defaults??
Will "dd if=/dev/zero of=/dev/hda bs=512 count=1000"
fix it to the defaults it should be at?
I really don't know how this happened-this was a third re-install of Slack12.2-trying to install a minimal system-(4GB HD & 160MB RAM).
I didn't partition anything, just re-formatted EXT3 for each partition(2).
It keeps saying the "block" size is out of whack-hopefully dd will fix it.
Thanks-I'm not at home now-will be soon-then I'll see what can be done-Should've never removed Slack!
 
Old 03-17-2009, 07:02 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,562

Rep: Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497
OK there come your nano how-to.

Let's suppose your disk's name be /dev/hda.

Type:
Code:
dd if=/dev/zero of=/dev/hda bs=512 count=1000
Then launch fdisk in interactive mode:
Code:
fdisk /dev/hda
Do not worry for the warnings, but type following commands at fdisk's prompt -- of course do not type anything from the # character (my explanations):
Code:
n # to create a new partition. By default type 83 (Linux)
p # it will be a primary partition
1 # it will be partition number 1 (max 4 primary partitions)
(hit return or type 1) # accept 1 as the default for first cylinder's number
3500M # the size of the partition
n # to create your second (swap) partition
p # primary partition again
2 # will be partition number two
(hit return) # accept the proposed first cylinder
(hit return) # accept the proposed last cylinder
t # to change the partition type for the swap
2 # to tell you want to change the second partition's type
L # to list the partition types, if you wish (optional)
82 # choose Linux-swap
p # to see the partition table before writing it on the disk if you wish (optional)
w # to write the partition table on the disk
Do not forget the last command, otherwise nothing will be physically written on the media.

In short you will have created two partitions and will be using:
- the first one (3500 megabytes) for /
- the second one (remaining space on the disk) for swap.

With such a layout you optimize space's usage, which is useful as you only have 4 GB available. It is not necessary to have /home on a separate partition. Of course even so you won't be able to install everything.

Last edited by Didier Spaier; 03-17-2009 at 07:20 AM.
 
Old 03-17-2009, 07:11 AM   #5
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
While your posts-are-readable, it's kind-of hard-to-read them because of all-the-dashes you typed-in. They look reminiscent of command-line-options and make things a little-bit-confusing.
 
Old 03-17-2009, 07:26 AM   #6
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
OUTPUT of fdisk /dev/hda after I did dd if=/dev/zero of=/dev/hda bs=512 count=1000-
Code:
Device contains neither a valid DOS partition table,
 nor Sun, SGI, or OSF disklabel
Building a new DOS disklabel. 
Changes will remain in memory only, 
until you decide to write them.

Number of cylinders for this disk 
is set to 8994.
There is nothing wrong with that, 
but this is larger than 1024, 
and could in certain setups cause problems with-
1-software that runs at boot-eg-old LILO
2-booting and partitioning software from 
other OS's-eg-DOS fdisk, OS/2 fdisk
Warning-invalid flag 0x0000 of partition 
table 4 will be corrected by write
So, what do I do now-I have not yet written to disk...?

Last edited by linus72; 03-17-2009 at 07:27 AM.
 
Old 03-17-2009, 08:11 AM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,562

Rep: Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497
This is an usual warning which shows no problem. Use fdisk as indicated in my last post.

PS I just tried with an USB stick; same warning: everything went fine.

Last edited by Didier Spaier; 03-17-2009 at 08:12 AM.
 
Old 03-17-2009, 08:14 AM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
OK-maybe it worked?
I tried to change the default from 8994 to 1024-didn't seem to take after writing to disk-even after reboot.
It also says I have 62 unallocated sectors-what does that mean?
 
Old 03-17-2009, 08:25 AM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,562

Rep: Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497
You do not have to - nor can you anyway - change 8994 to 1024: 8994 is proportional to the space on your disk. Do you really think that 4G is too much ?

62 unallocated (understand: not used) sectors is no big deal; do not worry about that.

Just to make sure, send the ouptut of 'fdisk -l'.

Last edited by Didier Spaier; 03-17-2009 at 08:27 AM.
 
Old 03-17-2009, 08:37 AM   #10
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Thanks for the help!
I am finishing up the Slackware (lite) 12.2 install now on the little 4GB HD.
As soon as it finishes I will post the output of fdisk -l
 
Old 03-17-2009, 09:11 AM   #11
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
OK-installed slackware 12.2 after following your directions-went fine
output of fdisk -l
Code:
Disk /dev/hda: 4327 MB, 4327464960 bytes
15 heads, 63 sectors/track, 8944 cylinders
Units = cylinders of 945 * 512 = 483840 bytes
Disk identifier: 0x72829cfb

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        8205     3876862   83  Linux
/dev/hda2            8206        8944      349177+  82  Linux swap
Dose that look ok?
here is free -m after swapon -a in KDE-running seamonkey and superterminal-
Code:
root@b:~# free -m
             total       used       free     shared    buffers     cached
Mem:           149        144          4          0          3         60
-/+ buffers/cache:         79         69
Swap:          340          0        340
here is dh -f
Code:
root@b:~# dh -f
-su: dh: command not found
root@b:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/root             3.7G  2.4G  1.1G  69% /
tmpfs                  75M     0   75M   0% /dev/shm
as soon as I get rid of KDS/XFCE4-then it'll be better-don't really know how to configure fluxbox yet-so kde/xfce4 are training wheels till then.
Any idea why no swap is being used??

Last edited by linus72; 03-17-2009 at 09:39 AM.
 
Old 03-17-2009, 09:42 AM   #12
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,562

Rep: Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497
Quote:
Originally Posted by linus72 View Post
OK-installed slackware 12.2 after following your directions-went fine
output of fdisk -l

...

Dose that look ok?
Yes.


Quote:
Originally Posted by linus72 View Post
Any idea why no swap is being used??
Simply because everything -- system + applications -- fit in RAM, so there is no need to put any live data on the disk. Keep in mind that swap space on disk is only used by the system if/when there is no more space available in RAM.

Obviously beeing able to keep everything in RAM is preferable, as input/output from/to disk are way slower than from/to RAM. This is why if you have a slow system, adding more RAM is usually the best bet to speed it up.

Hopefully systems based on Linux are usually not as memory hungry as other systems

Last edited by Didier Spaier; 03-17-2009 at 09:52 AM.
 
Old 03-17-2009, 09:52 AM   #13
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,562

Rep: Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497
Configuring fluxbox is easy.

In a pinch: you only have to edit a few files in ~/.fluxbox directory.

And among other resources on http://fluxbox.org they have a good wiki, with many howtos.
 
  


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



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:13 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration