Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello. First of all, please let me explain my situation. I installed Ubuntu on my HP laptop and it works fine. I want to keep it on my laptop, but I also installed it on my main computer and I would perfer to keep it strictly a windows machine and removing Linux while keeping it on my laptop or other computer I choose.
I like Ubuntu, I installed the Gnome desktop though, but I don't want it taking up a patition on my drive. I don't have a Windows 7 install disk either being that I bought the computer with it all ready installed. I know there's no real good answer and I do work hard at studying for the answers to questions before bugging people. This is the site I've been studying from, I pretty much have the answer, but don't want to do anything to make the computer into a big heavy paper weight. Thanks.
OK here's what YOU need to do. Once typing a post, read through it again, and edit out all the unrelated crap. I'm not having a go at you, just giving you advice. I had to read your post twice and still am not clear. Are you having issues with grub? or do you want to remove your ubuntu partition off your desktop computer?
OK here's what YOU need to do. Once typing a post, read through it again, and edit out all the unrelated crap. I'm not having a go at you, just giving you advice. I had to read your post twice and still am not clear. Are you having issues with grub? or do you want to remove your ubuntu partition off your desktop computer?
Sorry for the confusion, I was just trying to add some detail to the problem at hand. Anyhow, ultimatly I would like to completely remove Ubuntu from my desktop or at least set it up so Win 7 in the default OS and loads automatically.
To set windows as the default, you need to take a look at the grub.cfg file in the /boot/grub directory. Find your windows entry. Count the menuentry lines to your windows entry to determine which one it is.
Open the file /etc/default/grub with a text editor. Change this line in the file to use the windows menuentry: GRUB_DEFAULT=0
Grub counts here from zero so if your windows entry is the third entry in grub.cfg, put a 2 there.
If you are using the Ubuntu Grub to boot both Ubuntu and windows and delete your Ubuntu partition, you will be unable to boot anything as most of the Grub files are on the Ubuntu partition. You would then need to reinstall the windows bootloader into the master boot record and you will need a windows installation CD. Another option is to just shrink the Ubuntu partition if you don't plan to use it on that machine, depends on the size of your hard drive, how much space you have available.
Thank you so much for the reply! I am making great strides in learning the CLI and the command structure so all this doesn't make my eye glaze over I understand what y'all mean. I do only have two distros Ubuntu and Win 7 but there's memtest and a couple other options in the boot list as well, and I'm assuming that I would have to count those when entering in the right boot count in grub.cfg. Like I mention in my other posts, I'm really getting the hang of how Linux works, it seemed daunting at first but then ,y brain started making all the connections to similar DOS commands and concepts. Thanks again for the reply.
Quote:
Originally Posted by Larry Webb
If you only have two distros installed and you want windows to load by default.
From ubuntu terminal
Code:
sudo nano /etc/default/grub
then look for "GRUB_DEFAULT=0"
then change the "0" to a "1"
Now hit Ctrl and o then enter.
Make sure the 'Save As" name reads "/etc/default/grub" then hit enter again.
Thank you! I submitted a reply mentioning how there's a few different items in the boot list such as memtest, etc. I'm going to go ahead and try to count down to #6 which I believe is the right entry and see what happens. I used the SUDO command yesterday to install the gnome desktop and although I'm not an expert, I feel comfortable knowing the general concept of what it does. Thanks again for help.
Quote:
Originally Posted by yancek
To set windows as the default, you need to take a look at the grub.cfg file in the /boot/grub directory. Find your windows entry. Count the menuentry lines to your windows entry to determine which one it is.
Open the file /etc/default/grub with a text editor. Change this line in the file to use the windows menuentry: GRUB_DEFAULT=0
Grub counts here from zero so if your windows entry is the third entry in grub.cfg, put a 2 there.
If you are using the Ubuntu Grub to boot both Ubuntu and windows and delete your Ubuntu partition, you will be unable to boot anything as most of the Grub files are on the Ubuntu partition. You would then need to reinstall the windows bootloader into the master boot record and you will need a windows installation CD. Another option is to just shrink the Ubuntu partition if you don't plan to use it on that machine, depends on the size of your hard drive, how much space you have available.
One more thing. I know this going off into another subject, but real quick, if I shrink the partition which sounds good, I'll have to re-size the master partition that windows is on? Or do I have to manual expand it by entering how large I want it. I try my best to study up on things like this but I've always been a little shaky on partition theory and have been too intimidated to mess around with them. Thanks
Quote:
Originally Posted by yancek
Another option is to just shrink the Ubuntu partition if you don't plan to use it on that machine, depends on the size of your hard drive, how much space you have available.
Shrinking the Ubuntu partition may not be necessary. If you have a large drive (250GB or larger) and Ubuntu is on a 20GB partition, I wouldn't worry about it. If you have a small drive and feel you need the space, you would need to use the Ubuntu Live CD to shrink the partition. Are you planning to still use the Ubuntu Grub bootloader to boot both systems? If you are, you need to leave Ubuntu on because most of the Grub files needed are on the partition. You should be able to tell how much space is being used for Ubuntu in GParted so you don't shrink it too much. You should then be able to resize the windows partition with GParted or you should have some software in windows to do it.
With regard to setting windows as default, if it is the 6th menuentry item, you would put a 5 in the /etc/default/grub file on the line indicated in previous posts as Grub counts from ZERO.
Thanks! That was the same page I started reading before posting. It seems pretty straight foward but I don't have a system image and if I did, I don't want to be over confident and make my machine unbootable, so I really do appreciate all the help you and the others members have given me. I have a real interest in learning Linux and this excerise was a good example of that.
Quote:
Originally Posted by Larry Webb
Here is a great tutorial that I refer to that may help
I have a 1.5T drive and Ubuntu is taking up 589G of it. I still have enough room in my windows partition at the moment so it's not real important to get this issue resolved. I was messing around with Linux on my laptop today and I went to install Kbuntu and what I thought was the Linux partition but it was the W7 evidently because when I choose W7 from GRUB it gave me some error and booted into the recovery module, then said it couldn't recover. I really didn't care, there really wasn't anything important on it anyhow, so now I'm trying to go in and just format the whole hard drive and all the partitions and try and install XP and leave a partiton for whatever Linux distro's I want to install.
Quote:
Originally Posted by yancek
Shrinking the Ubuntu partition may not be necessary. If you have a large drive (250GB or larger) and Ubuntu is on a 20GB partition, I wouldn't worry about it. If you have a small drive and feel you need the space, you would need to use the Ubuntu Live CD to shrink the partition. Are you planning to still use the Ubuntu Grub bootloader to boot both systems? If you are, you need to leave Ubuntu on because most of the Grub files needed are on the partition. You should be able to tell how much space is being used for Ubuntu in GParted so you don't shrink it too much. You should then be able to resize the windows partition with GParted or you should have some software in windows to do it.
With regard to setting windows as default, if it is the 6th menuentry item, you would put a 5 in the /etc/default/grub file on the line indicated in previous posts as Grub counts from ZERO.
Formatting the whole hard drive will delete everything, including the the partitions still bootable. I recommend Gpart live cd for this. It'll be just a matter of booting it up, deleting eveything (formatting everything to what ever,(I always use fat32 as each install will format again to ext4 or what ever you deem appropriate), creating the partitions (empty) the sizes you want to dedicate to each individual partition. In your case Xp = x amount of space, Linux swap = Double your ram quantity, Linux = Remaining space. if you plan on having anything else on your huge hard drive, then you'll want to make other partitions prepared for them too.
Good luck
I want to keep it on my laptop, but I also installed it on my main computer and I would perfer to keep it strictly a windows machine and removing Linux while keeping it on my laptop or other computer I choose.
If you want to completely remove Linux, you can first use Windows' own partitition resizing tool. This is the safest option as it is native to the operating system. Then, you can install recovery console, I don't remember the exact name (bootrec /fixboot), and run bootrec that will restore the primary bootloader to do away with grub and anything that is Linux related.
Tip: I think, you should be able to back up your entire Windows installation as there are specific tools for this task. Even if you have no installation disk, you should be able to back up your entire Windows installation.
Hello. I want to thank everyone who's shared their mad knowledge with me. I'm not a novice but even the "advanced users" need a little help now and then. I ended accidently deleteing the Windows 7 partition from my laptop but I wasn't using windows on it much so no big lose. I installed open Suse which I really like. I am scared of partitions, I know man up, but there's so much that can go wrong, and I am actively studying up on the subject along with Linux in general and I feel more at home at the CLI. I can't really afford to play fast and loose on this machine like I did my laptop. I will work on this and keep y'all's advice in mind when I go about making the changes I need. Thank you again!
Quote:
Originally Posted by edbarx
If you want to completely remove Linux, you can first use Windows' own partitition resizing tool. This is the safest option as it is native to the operating system. Then, you can install recovery console, I don't remember the exact name (bootrec /fixboot), and run bootrec that will restore the primary bootloader to do away with grub and anything that is Linux related.
Tip: I think, you should be able to back up your entire Windows installation as there are specific tools for this task. Even if you have no installation disk, you should be able to back up your entire Windows installation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.